Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Help with changing character sprites when climbing ladders

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
sheamkennedy




Joined: 06 May 2013
Posts: 23
Location: Canada

PostPosted: Sat Jul 06, 2013 5:45 pm    Post subject: Help with changing character sprites when climbing ladders Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Sat Jul 06, 2013 8:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sheamkennedy




Joined: 06 May 2013
Posts: 23
Location: Canada

PostPosted: Sat Jul 06, 2013 9:30 pm    Post subject: Thanks Reply with quote

Thank you, this solves all the issues I was having.
_________________
SMK
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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