OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: marcus3 on 01 Apr 2005, 13:39:50

Title: go there
Post by: marcus3 on 01 Apr 2005, 13:39:50
i have seen a script where when you click a man he puts his gun down and gives up. i need it where when you click some where some loons walk there.
like being commander but not being it. so if you haappen to know how to do this then let me know.

thanks in advance

edit

can i ask a nother Q i dont want to start a nothe topic.
if you are running a script with a loop can you exit the script from a nother script?
Title: Re:go there
Post by: Baddo on 01 Apr 2005, 14:17:02
if you are running a script with a loop can you exit the script from a nother script?

Yes, with a global variable.

Looping script:

Code: [Select]
outofhere = false

#Loop

~5

? !outofhere : goto "Loop"
Other script (...or trigger or whatever):

Code: [Select]
outofhere = true
This applies to single player missions. In multiplayer mission editing you might have to do something else too, but let's not confuse you with that at this time.
Title: Re:go there
Post by: macguba on 01 Apr 2005, 14:18:33
For the other thing the command you need is onMapSingleClick.
Title: Re:go there
Post by: marcus3 on 01 Apr 2005, 14:21:46
well thanks you your help
Title: Re:go there
Post by: marcus3 on 01 Apr 2005, 14:24:50
O WAITE i have one more Q
can you change a name of a unit i have tryed useing the
Set identity
command but i dont think i am useing it right.
thanks
Title: Re:go there
Post by: Baddo on 01 Apr 2005, 14:27:59
Go to Editors Depot and search for 'Identities'. There's a good tutorial about it.
Title: Re:go there
Post by: marcus3 on 01 Apr 2005, 14:28:44
ok thanks