The Dink Network

Re: Locking items

January 1st 2008, 04:11 PM
dinkdead.gif
Is there any way to make it so when you select an item in the inventory nothing happens? I want to make an item that appears temporarily and while it's armed you can't change until it disappears by itself.

The only thing I've tried so far is putting if (&glob_var == 1) return; in the arm() procedure of other items. It didn't work

I don't think there's a way of making the enter key do something else is there?
January 1st 2008, 06:51 PM
burntree.gif
fireball5
Peasant He/Him Australia
Let me heat that up for you... 
so you want an item that will eventually dissapear when armed?

void arm (void)
{
wait(however many milliseconds you want);
kill_this_item(script name)
}

and to make it so you can't change it:

void disarm (void)
{
&cur_weapon = whatever number your item is
arm_weapon();
}

see if that works
January 1st 2008, 06:57 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
The enter key script is button7.c I think. Check out I, Kara Gu. In that D-Mod, pressing Enter just pauses the game.
January 1st 2008, 07:21 PM
dinkdead.gif
Fireball5: I know how to make the item, just not how to make it unchangeable. Your suggestion acts like this:

void disarm (void)
{
kill_game();
}


But thanks anyway.

DD95: Thanks, I'll take a look.

Edit: Yup, it's button4.c, I can disable the inventory or whatever using that. Thanks (again)
January 2nd 2008, 03:28 AM
knights.gif
/Cycles of Evil
January 2nd 2008, 05:34 AM
pillbug.gif
dinkinfreak
Peasant He/Him Greece
Real lurkers don't appear on the lurkers list. 
See if that works:
In any other weapon script put:
arm()
if(glued_weapon)
{
debug("Can't get that stupid thing off my hands!");
&cur_weapon = &glued_weapon_slot;
arm_weapon();
}