Steven1985
Active member
Hi, I'd like to have anim victory working also for npcs.
Thank you in advance.
Thank you in advance.
Do as you preferVictory 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.
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?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?![]()
To learn to make scripts have I to start from here? Noobs guide to scriptingFirst, don't use chatGPT or other's people's help. Second, practice alot. I had to get past crashes and errors before I know how to code properly.
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
@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.