Disable All Magic
Is there a way you can disable Dinks ability to cast magic when he touches something and then bring it back again when he touches another thing?
I was thinking of doing something along the lines of setting his magic level to 0 then back to whatever it was again by using another global variable, but that means a lot of work and another global variable slot gone, and from the way Hells Gate is progressing, I'm gonna need a lot of global variables.
I was thinking of doing something along the lines of setting his magic level to 0 then back to whatever it was again by using another global variable, but that means a lot of work and another global variable slot gone, and from the way Hells Gate is progressing, I'm gonna need a lot of global variables.
I was about to suggest sp_custom but saw it doesn't work for sprite 1...
You could make Dink lose all his spells and bring them back later if it's certain what spells he will have at that point.
You could make Dink lose all his spells and bring them back later if it's certain what spells he will have at that point.
An easier solution would be to set his &magic variable to 0. That way the magic doesn't recharge. Don't forget to set &magic_level
to 0 as well, (this makes sure he also can't fire the magic one last time if it's already full)
The weakness of this is that you have to store the old value of &magic, and when &magic increases (level-up or a potion) Dink will be able to cast magic again.
A better but more complicated solution is the one I used in the scourger for the final battle. I didn't want the player to be able to cast magic on him so I edited the magics script and put something like this in the void use(void) procedure:
if (&variable == 1)
{
say("I can't use magic!!",1);
return;
kill_this_task();
}
Remember that &variable needs to be a global.
to 0 as well, (this makes sure he also can't fire the magic one last time if it's already full)
The weakness of this is that you have to store the old value of &magic, and when &magic increases (level-up or a potion) Dink will be able to cast magic again.
A better but more complicated solution is the one I used in the scourger for the final battle. I didn't want the player to be able to cast magic on him so I edited the magics script and put something like this in the void use(void) procedure:
if (&variable == 1)
{
say("I can't use magic!!",1);
return;
kill_this_task();
}
Remember that &variable needs to be a global.
Both easier than my suggestion but he said he didn't want to use a global...