Jump to content
Sign in to follow this  
kittycat

Scripts/triggers in coop

Recommended Posts

I have a pilot that gets a m16 and flares with extra script in init field. However this never works in coop. Just me (host) gets the extra stuf if someone else plays pilot he gets standard gear

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; ***********************************************************************

; **** Custom unit script for Operation Flashpoint

; **** Generated by Chris's OFP Script Editor

; **** Custom Unit Wizard 2.0

; ****

; **** ORIGINAL FILE NAME: CUSTOM_UNIT.sqs

; **** INSTRUCTIONS: Run script from the INITIALIZATION box of the unit

; **** RUN CODE: [this] Exec "pilot.sqs"

; ***********************************************************************

; Get the unit parameter given

_unit = _this Select 0

; Strip the units current gear

RemoveAllWeapons _unit

; Add the new gear to the unit

_unit AddMagazine "M16"

_unit AddMagazine "M16"

_unit AddMagazine "M16"

_unit AddMagazine "M16"

_unit AddMagazine "M16"

_unit AddMagazine "M16"

_unit AddWeapon "M16"

_unit SelectWeapon "M16"

_unit AddMagazine "SmokeShell"

_unit AddMagazine "SmokeShell"

Exit

btw if I want th mission to end if pilot reaches trigger what to do?

Share this post


Link to post
Share on other sites

Creat a Script, for example "pilot.sqs"

pilot.sqs:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Man = _this select 0

Removeallweapons _Man

_Man addmagazine "M16Mag"

_Man addmagazine "M16Mag"

_Man addmagazine "M16Mag"

_Man addmagazine "M16Mag"

_Man addmagazine "M16Mag"

_Man addmagazine "M16Mag"

_Man addmagazine "M16Mag"

_Man addmagazine "M16Mag"

_Man addmagazine "SmokeShell"

_Man addmagazine "SmokeShell"

_Man addweapon "M16"

_Man addmagazine "GlockSmag"    

_Man addmagazine "GlockSmag"

_Man addmagazine "GlockSmag"

_Man addmagazine "GlockSmag"

_Man addweapon "GlockS"

_Man addweapon "Binocular"

exit

Init:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[PilotName] exec "pilot.sqs"

(The part with the "GlockSmag" and "GlockS" will add a sidearm and binoculars to the Pilot)

This should work in MP

Share this post


Link to post
Share on other sites

Create trigger with type End #1 or whatever number you want. Then syncronize or group (don't remember which it was... so test it) the trigger with the pilot.

Share this post


Link to post
Share on other sites
Then syncronize or group (don't remember which it was... so test it) the trigger with the pilot.

You have to "group" the trigger with the pilot.

Share this post


Link to post
Share on other sites

I make a new mission put 1 pilot and group with end1 trigger.... and it works

If I do the same in my mission it never works. Just the loose trigger works...

wtf is that?

Share this post


Link to post
Share on other sites
I make a new mission put 1 pilot and group with end1 trigger.... and it works

If I do the same in my mission it never works. Just the loose trigger works...

wtf is that?

Did u set the "Activation" on "Present"?

Do u use more than 1 "End#1"-Trigger? If u do so, the mission will end, if all "End#1"-Triggers are activated.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×