When I get near an enemy how do I get it to play a different animation?
I tried looking the answer up to this, but could find nothing. No matter what I typed.
system for each enemy
system compare two values: distance(player.x,player.y,enemy.x,enemy.y)<100
system trigger once
-- enemy set animation
Thanks LittleStain, but I need a little more help. Are any of these conditions or sub-events? How exactly would I put this in?
(Event)system for each enemy
(Sub Event) system compare two values: distance(player.x,player.y,enemy.x,enemy.y)<100
(Same Sub Event - Add a second condition) system trigger once -> Action-- enemy set animation
I'd have to say use the line of site behaviour. Adjust the line of site for a specific distance. Set an action so when the enemy has line of site to the player, start the animation.
I tried the last 2 responses and still nothing.
WASD to move
"BlueSoldier" is the enemy that I want to change to the animation "Throw"
https://www.dropbox.com/s/tfupt3a1r433x ... aproj?dl=0
CapX did not work
save as single file
Sorry about that. Here it is:
https://www.dropbox.com/s/mb2rso6h24vdd ... .capx?dl=0
If you include eventsheet1 into eventsheet zero it works..
The events are now on an eventsheet that isn't connected to the layout..
Either put the events on the eventsheet of the layout or include the eventsheet with the events inside it..
Develop games in your browser. Powerful, performant & highly capable.
Still trying to get it to work perfectly, but I'm having trouble with it freezing up on me and then shutting down everytime I try to make a sprite strip.
Work it out from this demo
Try this demo I made
Thanks, I'll take a look at it and let you know