Jump to content

Entering a 'Client' Unit Before Activation: Does It Generate an Event?


Go to solution Solved by Rudel_chw,

Recommended Posts

I am working on a placeholders script, a script which allows me to have placeholder static planes on the airfield parking until a player chooses the slot, at which point the placeholder is deleted. This allows the airfield to feel less abandoned.

The script works perfectly offline but, when the mission is being run on a dedicated server, there is enough delay between the player spawning and the placeholder being deleted that it causes the Client Unit to briefly collide with the placeholder unit which causes damage.

So, I thought of two possible solutions:

  1. Somehow disable collision on the placeholder static units.
  2. Set the client units as 'Late Activation' and have the script activate the unit after a short delay.

Sadly, I had no luck with the first solution. I decided to try the Late Activation workaround but since I was using "S_EVENT_BIRTH" for my script, it doesn't fire and the unit is not activated. So my question is, does entering a Late Activation unit create an event? I know it causes a message to appear to the client about the flight being delayed, but I'm not sure this is linked to an event.

Any suggestions would be appreciated.

Link to comment
Share on other sites

  • Solution

You might want to take a look at the "StopGaps" script of @cfrag, which does exactly what you want. To work in MP it does require a small script to be run in the server:

 

 

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

48 minutes ago, Rudel_chw said:

You might want to take a look at the "StopGaps" script of @cfrag, which does exactly what you want. To work in MP it does require a small script to be run in the server:

 

 

I am doing this as a project to learn LUA, so I've been avoiding other scripts and frameworks like MIST and MOOSE. That does look like it works exactly like mine, minus the server-side script, which is what I'm trying to avoid. I will mark this as solved as there does not seem to be a way to do what I want without server-side scripts. Thank you for the reply!

  • Like 1
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...