Switching states for an enemy

Hi All,

Relative newbie here, but a quick learn (I have a long history of coding in other languages). Here is what I would like to do (have found many potential examples, but nothing that quite fits).
-I am designing a boss that I want to be able to switch between modes. By this, I mean I want there to be two sets of walk/idle/pain etc, such that the boss might trigger, as a special move, a transition from one mode to the other (i.e., something like a flight mode with it's own set of attacks that persists until the boss takes damage, triggers the fall animation, and then reverts to ground mode).
-I've found Bloodbane's scripts related to flight (the ironkey.c script was enlightening; thanks) and a few others, but I'm wondering if there is a way to do this simply with built in functions. A standard boss ai would be used in both ground and flight mode (some form of chase with range triggers on various attacks). I'm a decent spriter, and have all those working already (palette issues sure were fun).
Any suggestions?
Thanks




 
For the switching modes, you may take a look at Weapons on the manual; they allow you to switch between the original character's animations and a alternativa one.

For the native flight, sorry, no can do without scripts.
 
Thanks for the reply.
This flight mode is for a boss, not a player, so I was hoping I could go around it, but maybe that's the best way. In theory, if using degravity and seta, flight should be possible for weapons.... I'll give it some thought.
 
Hi wrenchman82 :)

wrenchman82 said:
In theory, if using degravity and seta, flight should be possible for weapons....

It's not theory anymore  8). I've implemented that in multiple flying enemies such as Jetpack squad in Crime Busterv2.5 and harpy. Download Map Demo 9 to see the harpy and I've coded it.
 
Nice!
From what I can see though, the Harpy is always in flight mode, and toggles degravity back and forth depending on hits and whatnot. What I want is to be able to "trigger" flight mode (your "randomness" script is useful here actually) that has its own chase, freespecials, etc, until enemy is hit and returns to its original state. So I suspect weaponframe to trigger a new state, and the new state is coded a lot like Harpy. Seem reaonsable?
 
wrenchman82 said:
What I want is to be able to "trigger" flight mode (your "randomness" script is useful here actually) that has its own chase, freespecials, etc, until enemy is hit and returns to its original state.
I don’t know how to do that, but it reminded me of the Webern in king of dragons by capcom. The wyvern will fly and do some attacks, then land and after a while, wherever the player hit him or not, will switch to fly mode again and repeat the pattern. That behavior is not random though.
 
wrenchman82 said:
So I suspect weaponframe to trigger a new state, and the new state is coded a lot like Harpy. Seem reaonsable?

Reasonable enough. :)

I don't have many enemies which can fight both on ground and on air, sadly. Kyulene (Sailor Moon arcade) and Firebrand (Demon's Crest) came to mind.

Die_In_Fire said:
The wyvern will fly and do some attacks, then land and after a while, wherever the player hit him or not, will switch to fly mode again and repeat the pattern.

Oh right, that wyvern. Thanks for reminding :)
 
Yep; works really well with weaponframe. I actually wound up using a combination of your "randomness" and "desperation" scripts, such that there's always a probability that the enemy will fly after being downed, but that probability increases with decreasing hit points. Good fun :)
On another note, do you happen to know how to force a generic shadow to occur with "seta"? The shadow shows, but only when jumping and dashing, and it disappears as soon as "seta" is called.
 
That's strange. I have another enemy with same movement AI as the harpy called Ptero and it shows its generic shadow properly anytime.

Are you sure you've set offset properly?
 
Back
Top Bottom