Common event for when actors HP reaches 1

Status
Not open for further replies.

Thanos

Villager
Member
Joined
Jun 1, 2014
Messages
14
Reaction score
2
First Language
English
How would I go about making a common event that gets triggered when my characters HP reaches 1?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
When can your character's HP reach one? Only in battle? Outside of battle?


If only in battle, use troop events, which allow you to trigger them based on an actor's HP.


If outside of battle (and I don't like this idea), use a parallel processing common event to continually check the actor's HP. If it's 1, turn on a switch. If it's not 1, turn the switch off. Add a Wait 10 frames or something at the start so it's not doing it 60 times a second. Then condition your other common event by that switch.
 

Thanos

Villager
Member
Joined
Jun 1, 2014
Messages
14
Reaction score
2
First Language
English
Outside of battle, there are no battles in this game. (HP is used for something else)

use a parallel processing common event to continually check the actor's HP. If it's 1, turn on a switch. If it's not 1, turn the switch off. Add a Wait 10 frames or something at the start so it's not doing it 60 times a second. Then condition your other common event by that switch.
That's my issue, I don't know how to have it continuously check the actor's HP, how do I do that?

Sorry, I'm fairly new to this.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
First Language
Portuguese
Primarily Uses
RMMV
you could either put the value of the actor's hp on a variable, or use the Script option of the fork.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
You need to put your common event to parallel process, which requires a switch to start. So pick out a switch, and in the beginning of your game (ideally on the starting map hidden in your opening cutscene event) you turn this switch on so that this common event is always active.
 

Thanos

Villager
Member
Joined
Jun 1, 2014
Messages
14
Reaction score
2
First Language
English
Got it working, thank you all for the help.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top