[V] IdolNinja
Volition Staff
One of the things that has troubled us with Sandbox+ is the ability to reference open world objects in lua to do things with/to. For example, a mission has many objects (npcs, vehicles, etc) predefined so you can reference them by name in lua functions. Not so much in the open world though. The only way we can actually perform actions on, say, a car is to physically get in it and then we can use something like:
Is there any way to identify current open world objects in a similar fashion so we can manipulate them? For example, let's say I want to lock on to a specific ped (or even the nearest ped or group) and have them catch fire.
Code:
-- REPAIR CURRENT VEHICLE
if character_is_in_vehicle(LOCAL_PLAYER) then
vehicle_repair( get_char_vehicle_name(LOCAL_PLAYER) )
end
Is there any way to identify current open world objects in a similar fashion so we can manipulate them? For example, let's say I want to lock on to a specific ped (or even the nearest ped or group) and have them catch fire.