[VX ACE] SITTING WITH CONTINUOUS HEALING
Posts
Pages:
1
Well I wanted to make it so that when the Main Character sits down he heals +20 HP ever 7 seconds or so but after I sit down I can't stand back up since it's stuck on Loop.
Here's how I set it up.
So first I use a toggle event that I saw somewhere on the forums. (Thank you to that person, it really helps)
It goes:
Sit Down Toggle:
Sit Down Event:
List of the scripts I use in case one of them is conflicting with Loop
Here's how I set it up.
So first I use a toggle event that I saw somewhere on the forums. (Thank you to that person, it really helps)
It goes:
Sit Down Toggle:
Sit Down Event:
List of the scripts I use in case one of them is conflicting with Loop
Loops are generally buggy thorough RM history and prone to hang games. I'm using usually something like this instead:
<>Label
<>(some code)
<>Conditional branch: (condition that has to be met so loop can *CONTINUE*)
<><>go to label Label
<>Label
<>(some code)
<>Conditional branch: (condition that has to be met so loop can *CONTINUE*)
<><>go to label Label
I don't think I quite understood that, Do you mind taking a picture or something more specific since I don't know what label is.
First event page, under flow control, there are two label options. Label..., and Jump to label...
When you first place your first label, it kinda bookmarks that spot. You just give it a number, and voila. Now whenever you say "Jump to label 1" for example, it will go back to the spot where you defined label 1(with the label... option)
Apart from that..
The problem with your code up there, is that your break loop part is outside the loop. So it doesn't know from what loop you have to break out.
Put a conditional branch with the break loop part inside your loop, and it should be fine.
When you first place your first label, it kinda bookmarks that spot. You just give it a number, and voila. Now whenever you say "Jump to label 1" for example, it will go back to the spot where you defined label 1(with the label... option)
Apart from that..
The problem with your code up there, is that your break loop part is outside the loop. So it doesn't know from what loop you have to break out.
Put a conditional branch with the break loop part inside your loop, and it should be fine.
Well that's finally fixed, Thank you so much!!! =D
But now I've got another question, Do you know how I can make it so that during the "Wait" event the Conditional Branch is still going but the "Change HP" event can't be activated unless the "Wait" event is done.
But now I've got another question, Do you know how I can make it so that during the "Wait" event the Conditional Branch is still going but the "Change HP" event can't be activated unless the "Wait" event is done.
Make a check after the wait. If the wait is over, and the Switch Sit down is still down, THEN heal! Otherwise, Don't do anything.
In RMKlanguage: Make another condition branch after the wait, with as condition the switch is still on(and inside the condition branch the healing thing).
That should do the trick!
In RMKlanguage: Make another condition branch after the wait, with as condition the switch is still on(and inside the condition branch the healing thing).
That should do the trick!
Sorry but I couldn't understand what you mean by that, but maybe I should to make things more clearer.
What I'm trying to do is make it so that if I press the R button (Which is A for me and A is the same button for sitting also) the character will stand back up but the Wait event is making it so that I can't do anything for and I want to make it so that 1 event is an exception to the wait event while the others obey it.
Here's my try at it so that my crappy explanation makes more sense.
What I'm trying to do is make it so that if I press the R button (Which is A for me and A is the same button for sitting also) the character will stand back up but the Wait event is making it so that I can't do anything for and I want to make it so that 1 event is an exception to the wait event while the others obey it.
Here's my try at it so that my crappy explanation makes more sense.
Hmm, you might want to try a "STOP ALL MOVEMENT" script, which is really helpful for eventing. Try looking for one by YANFLY.
Get It Here
Have it so that instead of having the
Set Move Route: Player (Wait)
you have a switch which turns on that stops the player from MOVING, but not stopping the player from making inputs.
edit:
Sorry if anyone is against Scripting and Eventing being together in harmony.
Get It Here
Have it so that instead of having the
Set Move Route: Player (Wait)
you have a switch which turns on that stops the player from MOVING, but not stopping the player from making inputs.
edit:
Sorry if anyone is against Scripting and Eventing being together in harmony.
If you don't feel like downing anything, you could also try this setup:
(Tested, and working!)
Just the normal toggle system, on toggle your hero sprite changes, AND a new switch activates. Note: the wait I put in there is important, without that wait, it sometimes immediately turns off after you turned it on. Quite annoying :P
The switch activates two things: First of all the healing thing. I set it to 60 frames, because I didn't feel like waiting, but it should work with 420 as well :) The sound is merely so I know it activates. As you can see, I'm not using any loops here! Since this event is a parallel event, it immediately turns off when the switch is turned off. So the moment you press R again(or whatever input you want), it just gets turned off again.
And this event is to stop the movement. Since it's a auto event, just the wait is enough. Using the same switch, it gets deactivated the moment the switch gets turned off. So when the switch gets turned on, the auto event wait kicks in And the healing starts, and when the switch gets turned off, both just disappear at the moment the switch gets turned off.
(Tested, and working!)
Just the normal toggle system, on toggle your hero sprite changes, AND a new switch activates. Note: the wait I put in there is important, without that wait, it sometimes immediately turns off after you turned it on. Quite annoying :P
The switch activates two things: First of all the healing thing. I set it to 60 frames, because I didn't feel like waiting, but it should work with 420 as well :) The sound is merely so I know it activates. As you can see, I'm not using any loops here! Since this event is a parallel event, it immediately turns off when the switch is turned off. So the moment you press R again(or whatever input you want), it just gets turned off again.
And this event is to stop the movement. Since it's a auto event, just the wait is enough. Using the same switch, it gets deactivated the moment the switch gets turned off. So when the switch gets turned on, the auto event wait kicks in And the healing starts, and when the switch gets turned off, both just disappear at the moment the switch gets turned off.
Well none of these solutions seems to be giving me the results that I want so for now I'm just gonna have to work without it just until there's a better way to do this.
Thank you for the Stop All Movement script though, it really helped and thank you noicre for your setup it didn't give me the result I wanted but thank you for trying.
If I find a way to make this work I'll update this post.
Thank you for the Stop All Movement script though, it really helped and thank you noicre for your setup it didn't give me the result I wanted but thank you for trying.
If I find a way to make this work I'll update this post.
Pages:
1






















