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

Joined: 06 May 2013 Posts: 23 Location: Canada
|
Posted: Sat Jul 06, 2013 5:45 pm Post subject: Help with changing character sprites when climbing ladders |
|
|
I have created a script which makes each of the heros in my caterpillar party switch to "climbing sprites" which makes the characters look as though they are climbing. The problem with my script is it is dependent on the which slot each hero is in. For example: if John is in slot 2 he will become JohnClimbing when the script is carried out but if John is in slot 3 he will become SallyClimbing when the script is carried out.
Could someone show me a way I could alter my script or define each character in such a way that I can directly reference them and change their sprite in a more intuitive way?
Here's my current script:
Code: |
# LADDER MOUNTING, WITH CATERPILLAR PARTY
plotscript, ladder mount, begin
set hero picture (0, 6, outside battle)
set hero picture (1, 8, outside battle)
set hero picture (3, 9, outside battle)
end
# LADDER DISMOUNTING, WITH CATERPILLAR PARTY
plotscript, ladder dismount, begin
set hero picture (0, 2, outside battle)
set hero picture (1, 4, outside battle)
set hero picture (3, 3, outside battle)
end
|
_________________ SMK |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Sat Jul 06, 2013 8:49 pm Post subject: |
|
|
The first argument to the "set hero picture" command is the position in the party, not the hero ID number, so you should try something like this:
plotscript, ladder mount, begin
set hero picture (find hero(0), 6, outside battle)
set hero picture (find hero(1), 8, outside battle)
set hero picture (find hero(3), 9, outside battle)
end
the "find hero" command takes a hero ID number and searches for their position in the party.
This article explains in more detail: http://rpg.hamsterrepublic.com/ohrrpgce/Ways_to_refer_to_a_hero_in_a_script |
|
Back to top |
|
 |
sheamkennedy

Joined: 06 May 2013 Posts: 23 Location: Canada
|
Posted: Sat Jul 06, 2013 9:30 pm Post subject: Thanks |
|
|
Thank you, this solves all the issues I was having. _________________ SMK |
|
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
|