 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
cavemanerick

Joined: 03 Aug 2008 Posts: 74
|
Posted: Sun Aug 16, 2009 10:24 am Post subject: faking an inn |
|
|
for my inn script i want it to make it restore stats to there full abilties again i even used the script the archieves provided but it seems to not work heres exactly what i put in but it won't restore anything for some reason.
Code: |
set hero stat(0,stat:hp, get hero stat(0,stat:hp,maximum stat), current stat)
set hero stat(0,stat:mp, get hero stat(0,stat:mp,maximum stat), current stat) |
maybe the value of 0 is something i needed to put in and i just don't know exactly what or it just doesn't work for some other reason i don't know but any ideas would be appreciated. |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sun Aug 16, 2009 2:50 pm Post subject: |
|
|
0 is the hero id, as defined in your hsi file. _________________
|
|
Back to top |
|
 |
cavemanerick

Joined: 03 Aug 2008 Posts: 74
|
Posted: Sun Aug 16, 2009 8:21 pm Post subject: not working |
|
|
are you sure thats it because its not registering my hero's name? |
|
Back to top |
|
 |
Baconlabs PURPLE IS MANLY

Joined: 15 Mar 2009 Posts: 335 Location: Tennessee
|
Posted: Sun Aug 16, 2009 8:35 pm Post subject: |
|
|
Hero's name? If you're using names, then you'll need to say hero:NAME instead of just NAME. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Mon Aug 17, 2009 2:18 am Post subject: |
|
|
No, get/set hero stat take the position in the party as the first argument. To find this you would normally use the 'plot:find hero' command. For example, to heal hero 'Bob':
Code: | set hero stat(find hero(hero:Bob), stat:hp, get hero stat(find hero(hero:Bob), stat:hp, maximum stat), current stat) |
However I assume that what you want to actually do is heal everyone in the active party, that is, in slots 0 to 3:
Code: | variable (i)
for (i, 0, 3) do (
set hero stat(i, stat:hp, get hero stat(i, stat:hp, maximum stat), current stat)
set hero stat(i, stat:mp, get hero stat(i, stat:mp, maximum stat), current stat)
) |
_________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
cavemanerick

Joined: 03 Aug 2008 Posts: 74
|
Posted: Mon Aug 17, 2009 7:48 am Post subject: tried it |
|
|
well i tried about everything you guys gave me and it seems the scripting acknowledged it but for some reason my hero is still not healing. His mp and hp remain the same so i was wondering if there is any other ideas you guys may have heres my exact script and it seems to be in the game just its not working see if i did anything wrong here to somehow defuse the healing process.
Code: | plotscript,inn,begin
stop song
suspend player
play sound (55)
show backdrop (42)
wait(13)
fade screen in
wait(20)
variable (i)
for (i, 0, 7) do (
set hero stat(i, stat:hp, get hero stat(i, stat:hp, maximum stat), current stat)
set hero stat(i, stat:mp, get hero stat(i, stat:mp, maximum stat), current stat)
)
play song(song:inn song)
wait (24)
stop song
wait (45)
show map
end |
oo and the reason i put 0, 7 is because my game holds a total of 7 characters and i want even the ones in the reserve to be healed so if you switch them out i don't want them to have damage from there last battle still. |
|
Back to top |
|
 |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Mon Aug 17, 2009 8:14 am Post subject: |
|
|
I haven't actually looked into your script,
but there's this handy textbox condition:
As long as you turn this on, it'll heal the party's HP/MP after the textbox is shown.
(It doesn't actually bring up a shop or anything)
You could probably sneak it in during the backdrop as an invisible textbox.
Code: |
Suspend Box Advance
Show textbox (#)
Advance Text Box
Resume Box Advance
|
[edit]
I'm pretty sure the problem is that you want to use:
Code: |
set hero stat(find hero (i), stat:hp, get hero stat(find hero (i), stat:hp, maximum stat), current stat)
|
instead of
Code: |
set hero stat(i, stat:hp, get hero stat(i, stat:hp, maximum stat), current stat) |
|
|
Back to top |
|
 |
cavemanerick

Joined: 03 Aug 2008 Posts: 74
|
Posted: Mon Aug 17, 2009 10:33 am Post subject: thanks |
|
|
thanks man i'm sure this will work appreciate it. |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|