mp for enemies or attack cool down

Gurtag

Active member
hey guys how are you, i want to implement a cool down timer on an enemy attack animation but not shure how to or if there is a command for it, would be nice for enemies spaming projectiles and for multiple attack anim with same or similar range.
 
Hey Gurtag, the solution nsw25 uses or something similar is a good way to randomize attacks. But just FYI, yes AI controlled entities are subject to MP limits just like players so you can use that as a sort of timer. Their special moves default to energycost 0, so just change it to whatever amount you need. Just be careful you use MP only. The AI doesn't know to conserve its hitpoints and will happily spam itself to death.

DC
 
Thanks for creating this thread, I have the same problem... I try using the MP system like a player (MP and MP rate in the entity header and energycost in the anim freespecial1) but nothing change in the ennemi's behaviour. It spams the same attack like hell. I don't understand why.
 
O Ilusionista said:
Damon Caskey good to know. If I am now wrong, the manual says that enemies doesn't have MP. I remember that when using the new debug, it shows the enemies mp as zero too.

By default they don't, and their energycost for Special is 0. You have to manually set everything up for them.

DC
 
Thank for your help nsw25 but I've not found the right way yet because I don't know what to change.

nsw25 said:
Put that script at start of the move :)
I think it's what I did.

in header:
name       Enemy1
health       100
mp          15
mprate 1

...

in the move:

anim freespecial1
range 120 260
delay 10
        offset 74 102
energycost 10
mponly 1

...

So what's wrong?

nsw25 said:
My DBZ tournament demo game I made a while ago on gamejolt has similar scripts for the enemies so you can unpack that and see how that works
An example would be perfect and I've checked in your game every entity whose type is enemy and I found that just one with MP. It's Fsoldier1b but none of its attacks has energycost or something to use its MPs.
 
Back
Top Bottom