arm and kill
is there a way to force dink to arm a weapon, such as his fists after the current item he is using is killed
example...when dink uses an elixer nothing is armed anymore, i want it so he automatically arms his fists after it is killed
example...when dink uses an elixer nothing is armed anymore, i want it so he automatically arms his fists after it is killed
Maybe in the holdingdrop procedure of each weapon?
so what lines would i use? i know to use
arm_weapon();
but not sure how to specify which slot or item
arm_weapon();
but not sure how to specify which slot or item
Aha. I looked in start-1.c (which automatically adds and arms the first) to see that &cur_weapon specifies the weapon slot.
So you'd just do something like this:
&cur_weapon = 1;
arm_weapon();
So you'd just do something like this:
&cur_weapon = 1;
arm_weapon();
&cur_weapon = 1;
arm_weapon();
assuming that the fists are in the first slot. There's a 1.08 function that gets the slot of a given item script;
In 1.08, use:
&cur_weapon = get_item("item-fst");
arm_weapon();
EDIT: Blah, redink1 was first...
arm_weapon();
assuming that the fists are in the first slot. There's a 1.08 function that gets the slot of a given item script;
In 1.08, use:
&cur_weapon = get_item("item-fst");
arm_weapon();
EDIT: Blah, redink1 was first...
blah, doesn't work... here's what i have...
void holdingdrop( void )
{
&cur_weapon = 1;
arm_weapon();
}
add: i played around with it a bit added
&update_status = 1;
draw_status();
to it, but still no changes. same thing happens, you use the item, the icon stays there and you've got nothing equipped
void holdingdrop( void )
{
&cur_weapon = 1;
arm_weapon();
}
add: i played around with it a bit added
&update_status = 1;
draw_status();
to it, but still no changes. same thing happens, you use the item, the icon stays there and you've got nothing equipped
January 21st 2006, 08:35 PM

dinkmega


I remember something like that happening in a Dmod, but which one? Can't remember.

Try adding a 'say' line to see if holdingdrop is actually being called.
i tested it, it's being called.
add: something wierd...i took out arm_weapon(); just to see what would happen, and the fist graphic goes into the weapon slot, but still not armed...
add: something wierd...i took out arm_weapon(); just to see what would happen, and the fist graphic goes into the weapon slot, but still not armed...
more playing around with it...i made a key script...
void main ( void )
{
&cur_weapon = 1;
arm_weapon();
&update_status = 1;
draw_status();
kill_this_task();
}
and tested it. it works, it arms the fists. so i made it spawn in the holdingdrop command. the fist item graphic displays, but still no item is armed.
void main ( void )
{
&cur_weapon = 1;
arm_weapon();
&update_status = 1;
draw_status();
kill_this_task();
}
and tested it. it works, it arms the fists. so i made it spawn in the holdingdrop command. the fist item graphic displays, but still no item is armed.
In your spawned script, try adding wait(1); before anything.
well, what do ya know, it works now. thanks a bunch. so you have to spawn an extra script, who cares
maybe there's a way i can implement it into the script that give the potion it's effect.
add: got everything working o.k. now, wierd how it won't work in the holdingdrop procedure though

add: got everything working o.k. now, wierd how it won't work in the holdingdrop procedure though