Comparison
Synlight_Development
Member Posts: 10
How can I make it so that the enemy only moves if the player is within 100 of the enemy? Like if player.x - enemy.x <= 100?
Comments
When game.oneHundred >= player.x-enemy.x ... [behaviors]
Or, solve your equation for either of the attributes:
When player.x < = 100 + enemy.x ... [behaviors]
Or, constrain game.enemyDistance to player.x-enemy.x and then use that attribute in a rule.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User