Desblat Posted October 16, 2019 Share Posted October 16, 2019 The quiestion is actually more complex. I am making a mod that allows you to move objects attaching them to mouse cursor. But I don't want players to be able to throw objects into ocean. Mainly because I can't figure out to make items on water play their floating animation. (Second problem is - drowning enemies is just too easy.) Is it possible to detect those invisible walls that separate ocean and island? (So I can force drop grabbed object before it goes into ocean). I want to prevent this: Link to comment Share on other sites More sharing options...
Serpens Posted October 16, 2019 Share Posted October 16, 2019 usually you simply use functions from within components/map.lua , there you have for example: Map:IsAboveGroundAtPoint(x, y, z, allow_water) You call it with TheWorld.Map:IsAboveGroundAtPoint(x, y, z, allow_water) Link to comment Share on other sites More sharing options...
Desblat Posted October 17, 2019 Author Share Posted October 17, 2019 18 hours ago, Serpens said: usually you simply use functions from within components/map.lua , there you have for example: Map:IsAboveGroundAtPoint(x, y, z, allow_water) You call it with TheWorld.Map:IsAboveGroundAtPoint(x, y, z, allow_water) Good thanks! Link to comment 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