The Dink Network

A couple of questions

Summon Spell

September 25th 2007, 09:08 AM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
1) The summoned creature has 40HP. However, when you go to a new screen, any damage it might have taken is reset. Is it possible to make the script remember the ammount of HP left when entering a new screen?

2) Is it also possible to make a timer on the script, so the creature disappears after a set time limit (60 seconds for example)?

3) Is it possible to make the creature attack other creatures when hit, but not Dink, even if Dink attacks him?

Thanks.
September 25th 2007, 10:48 AM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
All of that is possible. I can't believe I had forgotten to do some of these things (or maybe it was intentional at the time?)

1) Make a global var for the summon's life. Set the variable to = summons current life in his hit procedure. If that doesn't work, you could always spawn a script with a loop that always makes the summon's life variable = to the summon's life. In summoned.c, set his sp_hitpoints() to his life variable. Remember to reset the summon life variable in the spell script.

2) You could make a timer by spawning a script and attaching it to 1000. Declare the timer value and make a loop with wait commands and increments the &timer value by +1 for each second. When your timer has reached a certain point, use hurt() to kill off the summon.

3) Just make the whole hit procedure (excluding the change to the summon hp variable if you did that here) an if statement that determines if Dink hit the summon. I think you can use &missle_source for this.
September 25th 2007, 08:34 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
1) Or you could use the sp_editor_frame attribute, so the sprite remembers its own health value.
September 25th 2007, 08:49 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
This confuses me, how exactly would that work? Excuse my ignorance
September 26th 2007, 01:27 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
This can only be done if the summoned creature is placed in the editor. Which most summoned creatures aren't.