void main() { if (GetLocalInt(GetModule(), "WaterTrapLim") == 0) { object oPC = GetClickingObject(); object oTarget = GetWaypointByTag("Arrive_watertrap"); //or whatever the tag is for your destination waypoint AssignCommand(oPC, JumpToObject(oTarget)); } }