Garry's Mod Wiki

ENTITY:IsJumpLegal

  boolean ENTITY:IsJumpLegal( Vector startPos, Vector apex, Vector endPos )

Description

Called when deciding if the Scripted NPC should be able to perform a certain jump or not.

This is only called for "ai" type entities

Arguments

1 Vector startPos
Start of the jump
2 Vector apex
Apex point of the jump
3 Vector endPos
The landing position

Returns

1 boolean
Return true if this jump should be allowed to be performed, false otherwise.

Not returning anything, or returning a non boolean will perform the default action.