-
Notifications
You must be signed in to change notification settings - Fork 196
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I have created an entity zone for a vehicle and set the offset as desired. Zone creates w/o error.
Debugging is on to ensure I enter the bounding box.
I'm using onPLayerInOut for the coordinate definition and toggling a variable via isPointInside.
When the player ped enters the zone, I have it set to print the value of the variable, but nothing happens at all.
Not sure what I may be doing wrong here, as I have successfully created & used entity zones in other projects.
code snippet provided below.
function CreateVehicleZone()
local VehZone = EntityZone:Create(TruckData.Id,{
name = 'DeliveryVehicle',
useZ = true,
debugPoly = Cfg.DebugTruck,
offset = {-5.0,0.7,0.0,0.0,0.0,0.0},
})
VehZone:onPlayerInOut(function(isPointInside,point)
if isPointInside then
inVZ = true
print('inVZ: '..tostring(inVZ))
else
inVZ = false
print('inVZ: '..tostring(inVZ))
end
end)
endMetadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working