Difference between revisions of "StartHelicopterBhv"
From Nomad DB
Wasdennnoch (talk | contribs) (Created page with "Starts the specified behavior on a helicopter. Possible usage scenarios are letting the helicopter fly a specific path or follow a specific entity. == Syntax == <syntaxhighli...") |
Wasdennnoch (talk | contribs) |
||
Line 14: | Line 14: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
StartHelicopterBhv(helicopterEntityId, GetInvalidEntityId(), GetLocalPlayerEntityId(), "HelicopterBhvSetup.1978142222") | StartHelicopterBhv(helicopterEntityId, GetInvalidEntityId(), GetLocalPlayerEntityId(), "HelicopterBhvSetup.1978142222") | ||
+ | -- To stop the heli following you around | ||
+ | StopHelicopterBhv(helicopterEntityId) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 14:14, 15 April 2020
Starts the specified behavior on a helicopter. Possible usage scenarios are letting the helicopter fly a specific path or follow a specific entity.
Syntax
StartHelicopterBhv(helicopterEntity, pathOrPos, target, config)
- helicopterEntity (string): The ID of the helicopter the behavior should be started on
- pathOrPos (string): The ID of the path to use or the entity to reach
- target (string): The ID of the entity the helicopter should follow
- config (string): Helicopter behavior ID that should be used, taken from HelicopterBhvSetup.lib
Example
Make a previoulsly spawned helicopter follow the player around.
StartHelicopterBhv(helicopterEntityId, GetInvalidEntityId(), GetLocalPlayerEntityId(), "HelicopterBhvSetup.1978142222")
-- To stop the heli following you around
StopHelicopterBhv(helicopterEntityId)