HomShaBom Posted June 11, 2016 Share Posted June 11, 2016 I found a problem with my scarecrow mod (https://steamcommunity.com/sharedfiles/filedetails/?id=522640509) where it spawns birds around it periodically, but if you place it too close to the water, 2 bad things happen: some birds get stuck in mid flight on the border between land and water some birds actually land on the ocean I am generating a point by taking a random angle and a random radius away from the scarecrow and then using the BirdSpawner to spawn a bird at that point. Obviously what's happening is if the scarecrow is too close to the water then the random point is *in* the water and then it tells the BirdSpawner to spawn a bird there. There's got to be some kind of way to determine if a point is in the ocean, right? Does anyone know how? Link to comment https://forums.kleientertainment.com/forums/topic/68084-how-to-check-if-a-point-is-over-water/ Share on other sites More sharing options...
Aquaterion Posted June 11, 2016 Share Posted June 11, 2016 if TheWorld.Map:GetTileAtPoint(x,y,z) ~= GROUND.IMPASSABLE then --code end Link to comment https://forums.kleientertainment.com/forums/topic/68084-how-to-check-if-a-point-is-over-water/#findComment-782362 Share on other sites More sharing options...
HomShaBom Posted June 12, 2016 Author Share Posted June 12, 2016 Excellent. Thank you. Link to comment https://forums.kleientertainment.com/forums/topic/68084-how-to-check-if-a-point-is-over-water/#findComment-782773 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now