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 On Keeping a Hero at the Front of the Party

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




Joined: 13 Sep 2004
Posts: 131
Location: Indiana

PostPosted: Tue Oct 12, 2004 8:49 am    Post subject: Help On Keeping a Hero at the Front of the Party Reply with quote

Just wondering if anybody can give me some suggestions on keeping a certain character at the front of the party. It doesn't necessarily have to be all the time (in battles and such), but mostly when talking to people or during plot scenes.

Things I've tried / don't want to try:

Arrow On Press Esc: I was trying to swap the hero when the player exited the menu after changing positions. It doesn't work. It only runs the program on the first "Esc" pressed, not the "Esc" used to exit the menu.

Arrow On Space / Enter: This is my current setup. Every time a player presses Space / Enter to talk to someone or advance a text box it moves the hero to the front. This works, but it's constantly running and is a minor nuisance.

Arrow Lastly, I don't really want to run it every time I need it, because I'm afraid I will wind up forgeting it a lot. Plus that would be a hassle.


Like I said, the "Space / Enter" thing is working, but I was wondering if anyone could come up with something better that I didn't think of, preferably not run as often.
Back to top
View user's profile Send private message Send e-mail AIM Address
Uncommon
His legend will never die




Joined: 10 Mar 2003
Posts: 2503

PostPosted: Tue Oct 12, 2004 9:19 am    Post subject: Reply with quote

You could try an each-step script.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Soule X




Joined: 13 Sep 2004
Posts: 131
Location: Indiana

PostPosted: Tue Oct 12, 2004 10:14 am    Post subject: Reply with quote

That's true, but my main problem is (without giving away too much about the game) the script checks for a long list of characters which, on my slow ass computer at least, causes a bit of a pause each time it checks.

So I'm kind of looking for something that is executed only every once in a while, as a pause each step would be annoying. If there was some way to execute script immediately after the menu, that would be perfect.
Back to top
View user's profile Send private message Send e-mail AIM Address
Uncommon
His legend will never die




Joined: 10 Mar 2003
Posts: 2503

PostPosted: Tue Oct 12, 2004 10:24 am    Post subject: Reply with quote

Well, maybe a for loop would help. Be more practical and easier on the interpreter, at least.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Soule X




Joined: 13 Sep 2004
Posts: 131
Location: Indiana

PostPosted: Tue Oct 12, 2004 10:38 am    Post subject: Reply with quote

Can you possibly give me an example? Like, where would I run it from, the load-game script? And would it just constantly be checking the first slot of the party for the characters? Would it run continuously the whole game?
Back to top
View user's profile Send private message Send e-mail AIM Address
Uncommon
His legend will never die




Joined: 10 Mar 2003
Posts: 2503

PostPosted: Tue Oct 12, 2004 10:53 am    Post subject: Reply with quote

Well, I was really just saying for the general script. It is possible that you could have a while loop in the map-autorun, and that would be running contuinously, but it would likey slow it down a bit and possibly disable the ability to use other scripts. You'd have to try it yourself.

But, if you're using a script to check each individual hero, it might be easier to just put the script you keep copy/pasting for each one into a for loop that just changes which hero it checks every time it runs. Show me an example of the script you're using and I'll show you what I mean.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Soule X




Joined: 13 Sep 2004
Posts: 131
Location: Indiana

PostPosted: Tue Oct 12, 2004 11:19 am    Post subject: Reply with quote

Bah, sorry, I misunderstood you. Yes, my script is already in that format. Thanks for the suggestion, though.
Back to top
View user's profile Send private message Send e-mail AIM Address
Mad Cacti
Guest






PostPosted: Sun Oct 17, 2004 12:41 am    Post subject: Reply with quote

For information about how to run your script after the menu, see the newly created page on the wiki:
http://gilgamesh.dnsalias.org:8080/wiki/ohrrpgce/index.php/How_can_I_run_a_script_instead_of/before/after_the_menu_comes_up%3F

From now on, I'm just going to create answers to general questions in there and link.
Back to top
Shadowiii
It's been real.




Joined: 14 Feb 2003
Posts: 2460

PostPosted: Sun Oct 17, 2004 9:17 am    Post subject: Reply with quote

Hmm, I don't know if this is helpful, but here is the code I used before every plot scene in Stop. It put April in front (sorry if I'm telling you something you already know).

Code:

#quick script before each new scene now to make sure April is the leader
if (leader <> 1)
then, begin
#April is not the leader, so we'll have to make her the leader
#Swap the leader (whoever he/she may be) with April (wherever he/she may be)
swap by position (0, find hero(hero:April) )
end
#Then continue as normal (if April is in front, then all is well)

_________________
But enough talk, have at you!
Back to top
View user's profile Send private message Send e-mail
Soule X




Joined: 13 Sep 2004
Posts: 131
Location: Indiana

PostPosted: Mon Oct 18, 2004 6:38 am    Post subject: Reply with quote

Wow, that was ridiculously simple.

Thank you very much Mad Cacti. That's exactly what I needed.

And yeah, I already have the script in my game Shadow, but thanks.
Back to top
View user's profile Send private message Send e-mail AIM Address
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