Post new topic    
Liquid Metal Slime
Send private message
Item that recovers HP and MP outside of battle 
 PostSun Apr 24, 2011 6:04 pm
Send private message Reply with quote
I want to have a recovery that is usable out of battle and recovers both HP and MP to maximum. Inside of battle, this is easy. I made an HP recovery attack and chain it to an MP recovery attack. How would I script this to work when used from the player's inventory?
Slime Knight
Send private message
 
 PostSun Apr 24, 2011 7:43 pm
Send private message Reply with quote
I think you could link it to a text box and set restore hp and mp to always on?
Metal Slime
Send private message
 
 PostMon Apr 25, 2011 3:51 pm
Send private message Reply with quote
Yeah, but going to a textbox for the HP/MP-restoring part also brings up a textbox, which doesn't normally happen when you use a regular healing item and might look a little weird. I guess it could work if it was a small box with "HP/MP restored!" or something along those lines, but... oh well.

It's not too hard to do this with a script, though.

Code:
   variable(insertnamehere)
   set variable(insertnamehere,pick hero)


This part brings up a hero-picking box, and uses a variable to keep track of who you picked. You'll probably want to change the global text string for pick-hero boxes before using this; I can't remember off the top of my head what the default is, but I know I've always changed it whenever I used "pick hero."

You'll probably want to use a different name for the variable (most likely something shorter, heh); I just used "insertnamehere" as a placeholder.

Code:
   variable(anothername)
   set variable(anothername,get hero stat(insertnamehere,stat:HP,maximum stat))
   set hero stat(insertnamehere,stat:HP,anothername,current stat)


This part makes the game know what the character's max HP is by recording it in a variable, then sets their current HP to be equal to their max HP. To restore MP too, just copy the "set variable" and "set hero stat" lines and paste them in after the HP-restoring part... then just change every part that says "stat:HP" to "stat:MP" (or whatever MP is called in your game, if it's something else besides MP. Same goes for HP.)

And if you want to have the item play a sound effect or flash the screen or some other effect like that when used, just put that in after the HP/MP-restoring part.
FYS:AHS -- Swapping out some step-on NPCs for zones + each step script
Puckamon -- Not until the reserve party is expanded.[/size]
Liquid Metal King Slime
Send private message
 
 PostMon Apr 25, 2011 4:13 pm
Send private message Reply with quote
Eventually I would like to have an option to enable (limited) chaining support outside of battle. Obviously chains that include enemy target would break outside of battle, but there is no good reason why an entirely ally-targeted chain couldn't work outside of battle.
Liquid Metal Slime
Send private message
 
 PostMon Apr 25, 2011 6:15 pm
Send private message Reply with quote
An infinitely recurring ally-targeted chain used out of battle could be terrific or terrifying.
Remeber: God made you special and he loves you very much. Bye!
Liquid Metal King Slime
Send private message
 
 PostMon Apr 25, 2011 7:49 pm
Send private message Reply with quote
Nathan Karr wrote:
An infinitely recurring ally-targeted chain used out of battle could be terrific or terrifying.


Even inside of battle that could wreck havoc if it had no delay.
Display posts from previous: