Jump to content

Recommended Posts

SOLVED. Leaving this up, and you can look in the comments to see the resolution.

 

Welp. I said I wasn't going to give away the details of the new Warfarin update, but I need help with one single problem...

 

The update is introducing the ability to climb, jump, vault, all that good stuff. The ability to leap over small gaps in terrain is where my problem lies:

 

To prevent Warfarin being able to walk on the water, I've made it so when landing in water the screen will go black, and then War will be teleported to a random spot around the shore. However, the edge of the ground (where the texture overhangs) is still considered as impassible terrain.

 

post-286034-0-78748500-1438961839_thumb.

 


local pt = Vector3(inst.Transform:GetWorldPosition())
local tiletype = GetGroundTypeAtPosition(pt)
local groundless = tiletype == GROUND.IMPASSABLE

if groundless then
 

^^ Is the code I've used to track what Warfarin lands on. I will admit I'm inexperience with terrain or where to search around for it.

 

So, anyone who can help? Or do I have to find another way around this?

Edited by Mr. Tiddles

 

I would mention you, but stupid periods.

 

Instead of the code you're using use the following to find a proper walkable offset.

FindWalkableOffset(position, start_angle, radius, attempts, check_los, ignore_walls)

A mention isn't needed, I already followed the topic. No problem.

And anywhere I could find that code in use? So I can look into it further.

scripts/simutil.lua

Oh. Of course. Literally the only .lua in the scripts directory my brain told me to disregard for some reason while looking for answers.

 

 

 

 

I feel like a right bell end.

Edited by Mr. Tiddles

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...