Jump to content

Triggering Helicopter Event to Follow a Player?


Planet Algol

Recommended Posts

  • 6 months later...
On 8/12/2019 at 6:53 PM, Planet Algol said:

So I made this fast travel mod that uses helicopters: https://steamcommunity.com/sharedfiles/filedetails/?id=1833104574

And I was wondering if there was any way to implement a feature where using it triggers a Helicopter Event that follows the Player?

 

 

Hello,

I took a look into the game's code and found the function "testHelicopter()". It starts up the helicopter event and makes it target a random player. It ends normally after a couple of in-game hours.

 

I tested this on build 40.43.

 

Here's a simple lua script I quickly made below that uses the function. Feel free to use/edit this code.

-- This simple lua script starts the helicopter event once a new game or saved game is finished loading.


-- This function starts the helicopter event.
function startHelicopterEvent()

    -- LuaManager.GlobalObject:testHelicopter()
    testHelicopter()

end

Events.OnGameStart.Add(startHelicopterEvent)

 

 

StartHelicopterEvent.lua

Edited by ATPHHe
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...