anim victory also for npcs

@Steven1985 in some other thread it is suggested that it is best to skip anim victory even for main characters - (the thing is a bit broken)

its seems that is a better practice to force an animation instead, and the advantage of such method is that a forced animation method should work the same on main character entities and any other entity....
 
Victory animation for NPC could be done. There are two ways to make it, provided NPCs have VICTORY animation or similar and they have script in their IDLE and WALK to change to VICTORY animation on cue. The cue is stored on global variable accessible to all entities and that variable is cleared when level ends.

1. Player sends the cue when he/she performs VICTORY animation. This is using default victory system.
2. An entity sends the cue when victory should be performed, that is when boss is defeated and all enemies have been removed from the screen and on other events.

I personally prefer #2 cause it could be used on multiple events but #1 is simpler.
 
Victory animation for NPC could be done. There are two ways to make it, provided NPCs have VICTORY animation or similar and they have script in their IDLE and WALK to change to VICTORY animation on cue. The cue is stored on global variable accessible to all entities and that variable is cleared when level ends.

1. Player sends the cue when he/she performs VICTORY animation. This is using default victory system.
2. An entity sends the cue when victory should be performed, that is when boss is defeated and all enemies have been removed from the screen and on other events.

I personally prefer #2 cause it could be used on multiple events but #1 is simpler.
Do as you prefer :).
 
Sorry for late reply, I've chosen #2 and it requires system not just couple lines so I had to prepare a demo to show it. And here's the demo: NPC Victory.

It has two modes : Game and Test in which both use same level but Test has enemies with less HP for easier testing. Otherwise, both have same system.
Try this demo to see how the system works.
 
Sorry for late reply, I've chosen #2 and it requires system not just couple lines so I had to prepare a demo to show it. And here's the demo: NPC Victory.

It has two modes : Game and Test in which both use same level but Test has enemies with less HP for easier testing. Otherwise, both have same system.
Try this demo to see how the system works.
Don’t worry. I know it takes time to create scripts. In the meantime, I was trying with ChatGPT, but it wasn’t working. What do I have to do to become as good as you? :)
 
Last edited:
I did the test. I wanted the NPCs to perform the victory animation only when all the bosses in the level are defeated, just like the player does by default and I did it disabling the lines of the two delay.
 
Last edited:
@Bloodbane Doing experiements, I saw that if there are 2 bosses and one of them dies, the level finishes and the player with npcs perform anim victory.
C:
spawn   Andore
spawnscript data/scripts/RandMZ.c
health  5
item    BossDed
coords  414 188 #-54 182
at      0
   
spawn   Jones #boss
spawnscript data/scripts/RandMZ.c
health  105
#alias   Steve
item    BossDed
coords  414 188
at      0

If one of two bosses is defeated, the other one also dies. I'd like that anim victory is performed when all bosses are defeated.
 
Last edited:
@Steven1985
you can fix this by spawning another group after the "bosses" die, this final group should be 1 1 and consist of an entity that spawns and autokills itself in milliseconds, tell the level.txt that this entity is the boss and it ends the level and triggers the animation
nsx is full of fake bosses like this and the scripts are there
 
@Bloodbane Doing experiements, I saw that if there are 2 bosses and one of them dies, the level finishes and the player with npcs perform anim victory.


If one of two bosses is defeated, the other one also dies. I'd like that anim victory is performed when all bosses are defeated.

Ah yes, BossDed is designed for single boss system. It's not for multiple bosses.
I'll think of something to solve this.
 
@Bloodbane, he can apply the bossdead item drop to the true last entity of the level on the last group and things should work out fine in most cases
 
Thanks for the suggestion. However the problem here is there is enemy spawner which won't stop spawning enemies until Bossded item gives cue to stop spawning. So the only way is to updated Bossded and the system to work with multiple bosses.
Currently, the update has been done but I need to test it with more bosses.
 
@Bloodbane I tried the version 2 of NPC Victory and I found some bug from 3' 45'': when I defeated the boss and I broke the obstacles that have BossDed, the player and npc performed anim victory but they did not come back to anim idle, so I had to go out from the game and restart from stage 4 by "load game". When I arrived to the same boss I repeated the same procedure but this time the anim victory wasn't performed (see 5' 40''). When I arrived to the last two bosses and defeated them, enemies spawned without end (see 6' 50'').
 
Back
Top Bottom