Difference between revisions of "StartHelicopterBhv"
From Nomad DB
m (fixed "previoulsly"... seriuously?) |
SpeckBomber (talk | contribs) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Page_WD2}} | ||
Starts the specified behavior on a helicopter to either follow a path, fly to an [[Entity|entity]] or chase a [[Pawn|pawn]]. | Starts the specified behavior on a helicopter to either follow a path, fly to an [[Entity|entity]] or chase a [[Pawn|pawn]]. | ||
Line 11: | Line 12: | ||
== Example == | == Example == | ||
− | + | To make the helicopter follow the player. | |
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
− | StartHelicopterBhv( | + | StartHelicopterBhv(helicopterEntity, GetInvalidEntityId(), GetLocalPlayerEntityId(), "HelicopterBhvSetup.1978142222") |
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 20:41, 27 October 2020
Starts the specified behavior on a helicopter to either follow a path, fly to an entity or chase a pawn.
Syntax
StartHelicopterBhv(helicopterEntity, pathOrPos, target, config)
- helicopterEntity (string): The ID of the target helicopter the behavior should be started on
- pathOrPos (string): The ID of the path to follow or the entity to reach
- target (string): The ID of the pawn to follow (if a chase behavior was specified)
- config (string): The behavior to use on the helicopter (corresponds to an item in the HelicopterBhvSetup library)
Example
To make the helicopter follow the player.
StartHelicopterBhv(helicopterEntity, GetInvalidEntityId(), GetLocalPlayerEntityId(), "HelicopterBhvSetup.1978142222")