Stupid boots.
Will something similar to this work?
Or can I make a fixed spot for the boots in the inventory somehow?
if (&cur_weapon == "s1-boots") //Supposed to be a number (1-16) for the inventory slots. { // do stuff }
Or can I make a fixed spot for the boots in the inventory somehow?
The only way for you to have a fxed position that the boots are in (that I kno of) is to replace all the items slots with placeholders like my Armour Demonstration.
I'm pretty sure you can check what item the player has equipped with DinkC anyway so unless you really needed to I probably wouldn't bother trying to fix the boots into one particular inventory slot.
I'm pretty sure you can check what item the player has equipped with DinkC anyway so unless you really needed to I probably wouldn't bother trying to fix the boots into one particular inventory slot.
What do you want to do exactly? Have the boots give their speed boost all the time they are in the inventory, even when not equipped, check to see if Dink has the boots equipped or just check to to see if he owns them yet?
It's for a savebot that checks for the boots:
If Dink is on the same screen as the savebot, when I equip the boots Dink speed will be set to fast. If I unequip them Dink's speed will still be fast even when he got his fists equipped. &whe and &log are heavy items that slows Dink down and &boo are the boots.
void main( void ) { sp_seq(¤t_sprite, 449); sp_sound(¤t_sprite, 34); sp_brain(¤t_sprite, 6); sp_hitpoints(¤t_sprite, 0); int &log = count_item("item-l"); if (&log > 0) { int &boo; &boo = count_item("boots-s1"); if (&boo > 0) { // If (&cur_weapon == "boots-s1") //{ set_dink_speed(2); } else { set_dink_speed(4); } } //} int &whe = count_item("item-l"); if (&whe > 0) { int &boo; &boo = count_item("boots-s1"); if (&boo > 0) { // If (&cur_weapon == "boots-s1") //{ set_dink_speed(2); } else { set_dink_speed(4); } } } //} void hit( void ) { say("Die, strange machine that doesn't belong here!", 1); }
If Dink is on the same screen as the savebot, when I equip the boots Dink speed will be set to fast. If I unequip them Dink's speed will still be fast even when he got his fists equipped. &whe and &log are heavy items that slows Dink down and &boo are the boots.
It's a mess but I can't see any other way to fix it. Any suggestions on how to check whether Dink has te boots equipped or not?
Use compare_weapon instead of count_item.
"count_item counts the number of items with the script "script" in the weapon/item inventory."
"compare_weapon returns '1' if the currently armed weapon is "script"."
That's the same as
Which won't work
"count_item counts the number of items with the script "script" in the weapon/item inventory."
"compare_weapon returns '1' if the currently armed weapon is "script"."
&boo = compare_weapon("boots-s1"); if (&boo == 1)
That's the same as
if (&cur_weapon == "boots-s1")
Which won't work