Jump to content
Planet Algol

Triggering Helicopter Event to Follow a Player?

Recommended Posts

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...