game over death state conditional branch not working

whotfisjojo

Swallow the Green Goo? >Yyeesss >NO!!!
Veteran
Joined
Jun 5, 2019
Messages
45
Reaction score
10
First Language
English
Primarily Uses
RMVXA
hello, im using galv's "actor duel mini game" script and its perfect i have no problems with the script itself
however ive stumbled across a problem when the "fight" is over i tried to use this conditional branch
"cond branch: if (main character/player) [death] is inflicted:
@> game over
@>
else
@> text: you win!"

this doesnt actually work and it instead shows the victory even if you lost(when death state is inflicted to character) and when i switched the text with game over it would show a game over but never a victory even if you didnt die
i have tried setting a common event parallel process to show a game over if death state is inflicted but that didnt seem to work either

if anyone can lead me in the right direction it would be much appreciated! thank you for your time! :0)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,747
Reaction score
7,860
First Language
German
Primarily Uses
RMMV
please show screenshots of the entire event - listing the commands is not enough.
I can think of several ways what you might have done wrong, but need to know more about the event to check which case might apply here.
 

whotfisjojo

Swallow the Green Goo? >Yyeesss >NO!!!
Veteran
Joined
Jun 5, 2019
Messages
45
Reaction score
10
First Language
English
Primarily Uses
RMVXA
1597683197367.png
edit: my bad! is this what you meant?
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,747
Reaction score
7,860
First Language
German
Primarily Uses
RMMV
here you go!
no
I specifically said that I need more than just the commands listed.
please give a screenshot of the entire event without cropping away the event properties
 

whotfisjojo

Swallow the Green Goo? >Yyeesss >NO!!!
Veteran
Joined
Jun 5, 2019
Messages
45
Reaction score
10
First Language
English
Primarily Uses
RMVXA
my bad i didnt think there'd be anything revealing with the whole event being shown
updated the image
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,747
Reaction score
7,860
First Language
German
Primarily Uses
RMMV
options like triggers etc can cause a lot of problems when used in the wrong situation, but this looks ok.
so the problem has to be within the script - can you link to the website of the script for cross-checking?
 

whotfisjojo

Swallow the Green Goo? >Yyeesss >NO!!!
Veteran
Joined
Jun 5, 2019
Messages
45
Reaction score
10
First Language
English
Primarily Uses
RMVXA
here it is

i should probably tell you i did tweak quite a bit of the script to my liking but i believe the only part that i changed that might affect this conditional branch would have to be: "line 882: @hp = 1 if @hp <= 0"
which i changed to: "@hp = 0 if @hp <= 0"
in hopes it would give the characters the death state which worked but it might also be the culprit of the conditional branch problem
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,747
Reaction score
7,860
First Language
German
Primarily Uses
RMMV
where did you get the idea that the loser would get the death state?
according to the script the winner will be stored in the variable you only check for "no winner" (which is zero) but never for the ID of the winner.
 

whotfisjojo

Swallow the Green Goo? >Yyeesss >NO!!!
Veteran
Joined
Jun 5, 2019
Messages
45
Reaction score
10
First Language
English
Primarily Uses
RMVXA
well when you start the fight any states inflicted like poison or death show beneath the hp bar and after the fight if you remove the "recover all: entire party" from the event whoever loses keeps their health from the fight which in the original script was 1 hp which isnt actually dead obviously
so i set it to 0 in hopes that it would inflict the death state even after the fight(which it does) and i could set a conditional branch that if the player had the death state inflicted it would play the game over scene (which it does not)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,747
Reaction score
7,860
First Language
German
Primarily Uses
RMMV
The engine needs to process the HP to determine if the death state should be applied, and that script is outside the regular engine behaviour - especially because you modified it.
you either need to manually add the death state where you modified the script (my best guess is that Galv intentionally wrote that battle to not enable death functions, which is why he set HP to 1 in it), or ignore the death state and check for winner first and then apply death if the actor is not yet dead.
 

whotfisjojo

Swallow the Green Goo? >Yyeesss >NO!!!
Veteran
Joined
Jun 5, 2019
Messages
45
Reaction score
10
First Language
English
Primarily Uses
RMVXA
thank you so much! this worked like a charm!
1597696128826.png
exactly what i needed! thank you andar!! :0))
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Based on this screenshot alone, which one would you sell, and which to equip?
Some random sketch-letons.

I have a strong urge to make a tutorial video of all the random things I've learned since starting on my game. little helpful tips and stuff that may help people.
Do you guys think it's better to have all members in your team from the beginning (then you can pick who battles) or you gain team members as the story goes?
PL: Patch polonizujący do RPG Makera 2003 prawie gotowy! Mamy przetłumaczoną bazę danych (projekt), polskie fonty, wiadomości walki i jakieś 90% edytora.
Do przetłumacznia pozostało te 10% edytora i plik pomocy. Niedługo więcej informacji!

Forum statistics

Threads
107,477
Messages
1,029,959
Members
139,605
Latest member
Anime_Weeb
Top