#Random Enemy Spawn Script
1 messages · Page 1 of 1 (latest)
you do nothing if the RayCast fails
so i need to do like this?
that will work but you would be better off working out why they are spawning outside of the map in the first place
they spawn in a circle around my character. if my character approaches the wall, they spawn outside.
so how should i do it? I did not write this script. I found it online...
In fact, if I can do something, I can try to do it that way. can we choose a tilemap as their spawn place?
we? no. You? maybe
I just want them to spawn inside this tilemap. any place will do. If my character is too far away, they automatically move close to it.
i don't know how to do it xd
ah I definitely didn't want you to write but thanks for your help anyway.
i suggest creating a collider that is trigger and create a Bounds variable with that collider to generate a random point within that collider