Hi guys this might be something so simple but i can figure it out haha
i have added the destroy outside behaviour to my bullet for example.
i use a camera to follow the player but when i fire the bullet and it goes past the camera view , it is still hitting the enemy who is outside of the camera view lol
any way to make it so if it goes out of camera view it deletes the object ?
the problem is that is i do a timer that after 2 seconds the bullet deletes and then reset the timer, the timer has already reset and begun again so it could be already on 1 second and then delete next second which doesnt give it time to get to end of the camera lol unless im doing it wrong
and the bullet does die when it hits the enemy however because the camera follows the player and the enemy is made to go to that player at say less than 400 pixels someone could just stand further away then that so that the enemy is out of the camera view and fire bullets at him without the enemy running at them. but if i could get it so the bullet deletes when out of camera view then it would not reach the enemy
Create a (or multiple) sprite that is always just outside the screen border.
Add an event as follows:
Condition: ‘on collision’ between the object you want to destroy and the sprite you’ve created to stay outside the screen
Action: Destroy the object
Hope this makes sense. Else let me know… I’ll upload an example