My character is only moving left and right.
dropbox.com/s/ejqovphvlwx1qd6/Frost%20And%20Found%20V2.c3p
Any idea how to fix?
Why aint this work? I am trying to test to see if a object is right next to me on any direction (everything is 128, 128) and then if there is nothing there I start moving that way.
I want to be able to test if an object is within X degrees north of me. I tried using angle and distance and stuff but cant figure it out.
Doesnt matter fixed it. Didnt realize for each had to be on top. Same solution for the zombie problems.
Hi, it's because your event pick all the skeletons at once instead of looping for each of them individually, you need to use "For each" condition on top of the event that check the distance between player and skeleton
Thanks! However this still doesn't affect it and the skeletons still dont work
Full screen?
I changed the zombie placement to make this issue easier to see. Zombies all face a single direction instead of the direction they are moving. Skeletons movement will be done based on which way their bone (throwable weapon) is aiming.
dropbox.com/s/3di09v8o7avwhe4/Roots%20Of%20The%20Forest.c3p
With one zombie it works fine.
(Also skeletons are moving together based on a single skeleton instead of when i get close to one)
Zombie movement is handled under move to in enemies
Develop games in your browser. Powerful, performant & highly capable.
Without seeing your events I cant be sure, but you could have conflicting movement demands as the enemy moves in and out of range. I like to use boolean instance variables that control what state the enemy is in. You can set them with your events. eg. If Enemy distance to player is less than 50 - set instance variable "Kite" to true If Enemy is Kite - (insert your custom kiting movement here and attacks here) - sub event - if Enemy distance to player is greater than (whatever you want) set Kite to False
Without seeing your events I cant be sure, but you could have conflicting movement demands as the enemy moves in and out of range.
I like to use boolean instance variables that control what state the enemy is in. You can set them with your events.
eg.
If Enemy distance to player is less than 50 - set instance variable "Kite" to true
If Enemy is Kite - (insert your custom kiting movement here and attacks here)
- sub event - if Enemy distance to player is greater than (whatever you want) set Kite to False
Yeah I thought about that. I decided I would have them move until they were 60 pixels away.
Okay thanks. Originally I was going to use 8 direction but came to the conclusion I wouldnt be able to move at 20° for example
So what behaviour am i moving it with?
distance(Skeleton.X,Skeleton.Y, PlayerBox.X, PlayerBox.Y) is less or equal to 60
set custom angle of motion to distance(Skeleton.X,Skeleton.Y, PlayerBox.X, PlayerBox.Y) - 180
accelarate custom 150
isnt working. Why is that?
Member since 3 Aug, 2020