game over death state conditional branch not working

whotfisjojo

Swallow the Green Goo? >Yyeesss >NO!!!
Veteran
Joined
Jun 5, 2019
Messages
45
Reaction score
13
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,838
Reaction score
7,897
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
13
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,838
Reaction score
7,897
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
13
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,838
Reaction score
7,897
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
13
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,838
Reaction score
7,897
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
13
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,838
Reaction score
7,897
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
13
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))
 

Latest Threads

Latest Profile Posts

Yay! Someone did a playthrough of my game. :D


When you thought you'd be finished with the grid, and spend ~8-9 hours on an arrow. How is this more difficult to than player movement?

Still some bugs hiding in there, but it's nearly complete.

I'm having it strictly follow the path a user draws, because there will be booby trap and other similar mechanics where you want to avoid specific cells.
I feel like banging my head against a wall every time I want to find that post that shows all the plugin header codes. Then I think "next time I find it, I'm going to bookmark it". Then I think "wait a minute ... maybe I bookmarked it last time because it took me so long to find it". Check bookmarks, and there it is :)
... a few of my main characters standing around doing nothing lol. I mostly wanted to see them together on screen.

Forum statistics

Threads
107,831
Messages
1,032,474
Members
139,977
Latest member
Yeicass
Top