OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: johan_d2 on 09 Mar 2005, 00:06:06

Title: Wait!! we follow you!
Post by: johan_d2 on 09 Mar 2005, 00:06:06
Hi, in my mission I have civillian who is an informant and lead the way to a certain point. Since the player has no waypoints, how do I keep him from going his route and wait for us(me) while we securely follow him?

At the moment I use small steps, where he waits for a second or 10, but it would be better if he sticks with me..

Any idea how?

Johan

Title: Re:Wait!! we follow you!
Post by: StonedSoldier on 09 Mar 2005, 00:26:32
_civvi = _this select 0
_soldier = _this select 1

#go
_civvi domove getpos someplace
_civvi setspeedmode "full"
@(_civvi distance _soldier)>20
dostop _civvi
_civvi sidechat "Try to keep up with me"
@(_civvi distance _soldier)<20
_civvi sidechat "Ok, Follow me"
goto "go"
Title: Re:Wait!! we follow you!
Post by: johan_d2 on 09 Mar 2005, 00:57:34
_civvi = _this select 0
_soldier = _this select 1

#go
_civvi domove getpos someplace
_civvi setspeedmode "full"
@(_civvi distance _soldier)>20
dostop _civvi
_civvi sidechat "Try to keep up with me"
@(_civvi distance _soldier)<20
_civvi sidechat "Ok, Follow me"
goto "go"

Hmm.. looks good, but what if I put waypoints on my map? "someplace" isnt know? or?
My civvi is taking not a direct route, but goes a certain path.

Johan