RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
How do you die from an event?

0 Members and 2 Guests are viewing this topic.

***
Rep:
Level 82
We learn by living...
I've made some events that reduce sp or hp, but nothing seems to happen with the numbers hit 0. The status says knockout, but the actors still walk around talking like usual. I rather like this default for programming stuff like ghost worlds, or the planes when you die, but how do I get an event to register the character is "game over, dead" when their hp goes to zero from something like a trap?

*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
I do not know what you mean by "ghost worlds" and "planes," but there's an event on the third page in the bottom right-hand corner called "Game Over." Simply trigger that, and it'll call the Game Over screen.

Hope that helps,
Rex.

***
Rep:
Level 82
We learn by living...
So I made a basic single actor (my actor's name is Zeno) addition, it seems logical to make this into a common event,
but it also needs a swap mechanism for multiple actors.

Code: [Select]
@>Control Variables:[0009: actor hp] = [Zeno]'s HP
@>Conditional Branch: Variable [0009: actor hp] <= 0
 @>Game Over
 @>
 : Else
 @>
 : Branch End

For example, if I have a second actor in the party and my leader dies, then my main actor and map avatar becomes the second party member.

Also need a way of saying "if [Actor 1] AND [Actor 2] ... AND [Actor 3,4,5, etc.] are 0 HP, then game over."

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
If all your actors have 0 HP the game is over anyways dude.

***
Rep:
Level 82
We learn by living...
not actually true. I've done this many times. When all my actors hit zero hp, through events, nothing happens. I can keep talking to other NPCs, trigger events, gain event/quest based exp, skills, and so forth. Try it yourself by creating a map with no monsters and events that deal damage.

Edit: i think this is so you can do those "all party is dead" events in battle like the boss fights, such as Final Fantasy 4.

*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
I believe that you can have the death of all of your actors (or a specific amount) trigger a switch (or switches). It's just a matter of making the correct combination.

If you check in the menu, are they actually at 0 HP? Can you take a screen shot of this event you have, and upload it for us to look at? There may be something wrong with the setup and triggers.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
SirJackRex pretty much has it on the ball. If you do not check the box "Allow knockout in battle", then your actors will only go to 1 HP. Or at least thats what happened when I tried it.

EDIT: Had no idea you were talking about XP. My mistake...

« Last Edit: April 25, 2010, 05:18:08 PM by cozziekuns »

***
Rep:
Level 83
Kidfox70. It happens.
It seems like all he would do is have a common event that was set to par pro.

have it checking to see if the party leader's hp is greater than 0. if it is, nothing, if it isn't then change the players graphic to the next member of the party.
I don't say bless you when people sneeze, cause i'm not God. Blessing people is his job. Lolo?

***
Rep:
Level 82
We learn by living...
I believe that you can have the death of all of your actors (or a specific amount) trigger a switch (or switches). It's just a matter of making the correct combination.

If you check in the menu, are they actually at 0 HP? Can you take a screen shot of this event you have, and upload it for us to look at? There may be something wrong with the setup and triggers.


here's an image shack screenshot of what I see:
Screenshot
Spoiler for:


I can include screen shots of the code if you like.

***
Rep:
Level 85
Winter is here.
IIRC, there should be a Conditional Event that checks if the character's HP is equal to some value. You could play around with that and see what happens. I'm not entirely sure, though.
Eddard Stark art by Teiiku

***
Rep:
Level 83
Kidfox70. It happens.
Quote
Conditional Event that checks if the character's HP is equal to some value.

Yeah, thats basicly what I said. But I'm pretty sure the best way to do what he wants (what I think he wants), is put it in a Common Event set by a Parallel Processing. All he would have to do is turn on a Switch in the very beginning of the Game or what have you, to make the Common Event check the Hp vaule of the Hp Variable. He can use this for the Swaping thing.

I have a problem here, I'm a bit confused. At first it seems like you want to give a Game Over to the Player when he triggers an Event, say a Trap Event. But then you talk about them walking around and you want to be able to Swap the main Sprite for the Sprite of the next person in your Party. Which is fine, I understand why you're confused. It's just, if you give a game over...then it's a game over, ergo you can't do the swaping thing. But if you want to have them, when knocked out, swaping for who ever is next. Then you need that Common Event I spoke of before and the Conditional Branchs Reading the Hp Variable of every actor, then changing sprite Graphics.

If there is something I'm missing, please tell me. As always I hope I've helped. Also, I like the Idea of the Swaping Party members for the Healthy one, nice work.  :D
I don't say bless you when people sneeze, cause i'm not God. Blessing people is his job. Lolo?

***
Rep:
Level 82
We learn by living...
The swapping out a "dead" one for a healthy one is a good idea, and you are right, the game shouldn't end just because one of the players is dead unless there's a storyline behind it (you are the main character and resurrection doesn't exist) or you are solo. The thing I was originally confused about is the fact that even with both characters knocked out, the game didn't end.

I don't know how to set a conditional branch that checks for multiple truths, like in flash,

Code: [Select]
if(Zeno.hp == 0 && Heron.hp == 0){run_gameover();}

But in Event systems? I am noob.


*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
lol actionscript.

Okay, so here's what I did and it worked perfectly. This is assuming that you want a switch that triggers a game over when something is interacted with. In this case, you "activate" a chest and it kills you.
You need two events: One to turn on the switch that will call the game over, and one event to call the game over.
Spoiler for screen:
Tell if that's what you're after, if not, I'll try to help you further.

Good luck,
Rex.

EDIT: Lol, what did I just say? I think what you meant is you it to check whether or not the health is at 0 HP, and if it is to call the Game Over screen. Sorry, I had misunderstood. Anyway, you can use the former method if you wish, but I can tell you how to do the latter method in a moment, or I'm sure other members can help you. I need to go make dinner now, ho ho! ;)
« Last Edit: April 25, 2010, 02:23:08 AM by SirJackRex »

***
Rep:
Level 82
We learn by living...
i first tried a variable that totaled all party hp, but nothing happened, so I came up with this:

Spoiler for:
@>Conditional Branch: [Zeno] is [Knockout] inflicted
 @>Conditional Branch: [Heron] is [Knockout] inflicted
_ @>Game Over
_ @>
 : Else
_ @>Set Move Route: Player
_ : ______ : $Graphic:"128-Noble03', 0, 2, 0
_ : ______ : Move Animation ON
 @>
_ : Branch End
 @>
 : Else
 @>
 : Branch End
@>

Which switches my main guy if he dies to my second guy, and ends the game if they both die. It's far from a "universal" code though, and if I change my party through events later, I would have to rewrite it.

*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
Let's try this:
Code: Event: Parallel Process [Select]

@>Conditional Branch: [Player One] is [Knockout] inflicted
  @>Conditional Branch: [Player Two] is [Knockout] inflicted
    @>Game Over
    @>
   : Else
    @>
   : Branch End
  @>
 : Else
  @>
 : Branch End
@>Conditional Branch: [Player Two] is [Knockout] inflicted
  @>Conditional Branch: [Player One] is [Knockout] inflicted
    @>Game Over
    @>
   : Else
    @>
   : Branch End
  @>
 : Else
  @>
 : Branch End

The conditional branch you're looking for is found on the second tab of the "Conditional Branch" event, if you do not already know.
So what that's going to do for it this: Check to see if Player one and two are knocked out, and then check to see if player two and one are knocked out, respectively. If it returns true, then it will call the Game Over screen. I have tested this method and it works well.

Good luck,
Rex.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
Rex is right about checking for Knockout rather than HP. It's easier to maintain in general that way. You don't have to add or subtract numbers to do it, you only need to apply or remove that state if necessary.