posted 09-19- 10:42 PM CT (US)
If you want something to detect if its been hit, it needs to be in the void(hit) of that sprites script. Its not so bad, just attach the same script to every sprite, on that says if hit, spawn this script. If you did not know of spawning...basicaly, put this on everything you'll be hitting:void hit(void)
{
spawn("GAURDSCRIPT");
}
Then make a script where the gaurds come, its that easy.
About checking if he has a weapon out...do you want that to not include fist? Because the fist is usualy the first box, so you can check if he's got it equiped with the &cur_weapon command. Basicaly to see if he's got the fists attached:
if (&cur_weapon == 1)
{
fists attached
}
if (&cur_weapon != 1)
{
something else
}
if you want him to equip the fists if he hasn't, just add this:
&cur_weapon = 1;
arm_weapon();
&update_status = 1;
draw_status();
i think you need the draw_status and update_status....oh well, thats basicaly it. Another way to check exactly what he's got equiped is checking the script of it, not the number. This is useful to see if he's got a sword out or a bow or maybe just a potion. Use the compare weapon command like so:
int &check = compare_weapon("item-fst");
if (&check == 1)
{
using fist
}
if (&check == 0)
{
not
}
and if thats not good enough, you can just do a check of every item he could have up to the game, and maybe do something different for each one.
the second meathod is better for checking what he's using, and the first allows you to equip something spacific. there's also a command to count your items of a certain kind, can't remember right now, ask if you need to know, its in most shop scripts too. Combined these meathods really allow you to do a lot.
Hope that really long rant helps!
FF4LIFE
BobHog
Will M!
OkalyDDude
PS, now that i'm back into the groove of school a bit, i plan on taking my dmod back up soon, so look for the re-release of Okaly-D Dink Demo soon with a lot of cool spiffy stuff that you can steal!