OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Viking on 08 Oct 2002, 00:14:58

Title: "Recon" script
Post by: Viking on 08 Oct 2002, 00:14:58
I am making a mission where you have to reconoiter the enemies positions, and report them in to HQ....
I was wondering: What is the script for the player controlled unit to see an enemy unit, and then as soon as the player has seen it, he reports back to base about what he is seeing(in SideChat)????

And yes, I have already checked the Ed Depot, but as i had no idea what the script could be called, well....

Viking
Title: Re:"Recon" script
Post by: Kaliyuga on 08 Oct 2002, 00:58:46
Well... depending on how many guys you are wanting to call out to base... you could just use a simple trigger or two....

something like this

Condition: player knowsabout enemy > 3
On Activation: player sidechat "enemy spotted"


that's it...   you could also add a line on your activation field to make an objective check off when you identify and call to base ;)
Title: Re:"Recon" script
Post by: Captain Winters on 08 Oct 2002, 04:25:01
i remebr using this a while back:

; When player knows about these units the recon objective is complete

_count = 0

#loop

_unknown = player countEnemy list trigger1
? _unknown > 5 : goto "here"
~0.05

goto "loop"


#here
~2

Hint "Objective complete."

"1" objStatus "Done"

obj1 = true

exit
Title: Re:"Recon" script
Post by: Viking on 08 Oct 2002, 12:15:01
Thanks guys,

Winters,
do you mind explaining a bit more about that script?;D          Do I need to add anything to it?
What is the execution line for it?

Thanks,
Viking
Title: Re:"Recon" script
Post by: Fatherbob on 20 Oct 2002, 16:36:05
that's it...  you could also add a line on your activation field to make an objective check off when you identify and call to base

Kaliyga would U mind telling me what that command would be ?
For instance how to make a "contact note" on the map , when the enemy was spotted.