Upon Game Over, a variable becomes equal to last EnemyID

AquaticChaos

Veteran
Veteran
Joined
May 14, 2017
Messages
32
Reaction score
2
First Language
English
Primarily Uses
RMMV
Let's say I want to create custom game over text based on the last enemy that went (AKA the one to cause you to lose). But how would I do this with variables? Like, get the enemy ID of the last enemy that attacked, then make the variable equal to it. That, or am I missing something much easier?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You could put something like \v[10]=a.id (might be a.enemyId) at the start of every damage formula, or ask for a plugin to be written.

But you would also need to override the default gameover behaviour - unless this is an evented battle and you have "continue even when lose" checked.
 

AquaticChaos

Veteran
Veteran
Joined
May 14, 2017
Messages
32
Reaction score
2
First Language
English
Primarily Uses
RMMV
I could probably just do the first option, and I would have a way to override the default...if SRD's GameOverCore actually worked, that is. If there's any others I can use, I'll update this.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
you might have problems if actors and enemies can use the same skill (like attack) - if an actor used the skill and had the 'confused' state, or any state that caused them to attack their own party, you might end up with a gameover and an actor id in the variable rather than an enemy id.
 

AquaticChaos

Veteran
Veteran
Joined
May 14, 2017
Messages
32
Reaction score
2
First Language
English
Primarily Uses
RMMV
That's true, at least if "v[10]=a.id (might be a.enemyId)" (Which you stated earlier) returns an ID regardless of enemy or actor. I have yet to test it, though.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top