View previous topic :: View next topic |
Author |
Message |
Soule X

Joined: 13 Sep 2004 Posts: 131 Location: Indiana
|
Posted: Tue Oct 12, 2004 8:49 am Post subject: Help On Keeping a Hero at the Front of the Party |
|
|
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:
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.
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.
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 |
|
 |
Uncommon His legend will never die

Joined: 10 Mar 2003 Posts: 2503
|
Posted: Tue Oct 12, 2004 9:19 am Post subject: |
|
|
You could try an each-step script. |
|
Back to top |
|
 |
Soule X

Joined: 13 Sep 2004 Posts: 131 Location: Indiana
|
Posted: Tue Oct 12, 2004 10:14 am Post subject: |
|
|
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 |
|
 |
Uncommon His legend will never die

Joined: 10 Mar 2003 Posts: 2503
|
Posted: Tue Oct 12, 2004 10:24 am Post subject: |
|
|
Well, maybe a for loop would help. Be more practical and easier on the interpreter, at least. |
|
Back to top |
|
 |
Soule X

Joined: 13 Sep 2004 Posts: 131 Location: Indiana
|
Posted: Tue Oct 12, 2004 10:38 am Post subject: |
|
|
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 |
|
 |
Uncommon His legend will never die

Joined: 10 Mar 2003 Posts: 2503
|
Posted: Tue Oct 12, 2004 10:53 am Post subject: |
|
|
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 |
|
 |
Soule X

Joined: 13 Sep 2004 Posts: 131 Location: Indiana
|
Posted: Tue Oct 12, 2004 11:19 am Post subject: |
|
|
Bah, sorry, I misunderstood you. Yes, my script is already in that format. Thanks for the suggestion, though. |
|
Back to top |
|
 |
Mad Cacti Guest
|
|
Back to top |
|
 |
Shadowiii It's been real.

Joined: 14 Feb 2003 Posts: 2460
|
Posted: Sun Oct 17, 2004 9:17 am Post subject: |
|
|
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 |
|
 |
Soule X

Joined: 13 Sep 2004 Posts: 131 Location: Indiana
|
Posted: Mon Oct 18, 2004 6:38 am Post subject: |
|
|
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 |
|
 |
|