OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Meatball0311 on 15 Dec 2005, 23:13:08

Title: Need help with doFollow
Post by: Meatball0311 on 15 Dec 2005, 23:13:08
This is the situation,  I want my Radio Operator to follow me wherever I go.  I am using the Hand Signal Communications System by Gen Barron.  

OK what I am doing is placing in my RTO init field:

RTO doFollow player

OK what am I doing wronge?
Title: Re:Need help with doFollow
Post by: Meatball0311 on 16 Dec 2005, 01:18:59
Ok this is not working.  Does this command actually work?  I am even trying to use a script to make the RTO follow the leader.  This is what I have in my script:

_unit = _this select 0

_unit doFollow player

exit

this is what I have in the init field of my RTO:
[this] exec "doFollow.sqs"
Title: Re:Need help with doFollow
Post by: marcus3 on 16 Dec 2005, 01:33:34
i dont think this is a command. here put this is a script called follow

_dude = _this select 0

#follow
_dude domove getpos player

~1

goto "follow"

then in init

[this] exec "follow.sqs"

hope this helps :D

Title: Re:Need help with doFollow
Post by: Meatball0311 on 16 Dec 2005, 02:24:45
Big B you da' man!  Thanks it is working well.
Title: Re:Need help with doFollow
Post by: SEAL84 on 16 Dec 2005, 02:32:07
I believe doFollow is the scripting equivalent of the player telling a unit to "return to formation."  I don't think it works on non-grouped units.
Title: Re:Need help with doFollow
Post by: marcus3 on 16 Dec 2005, 04:43:48
np...now...click solve down near the bottem  ;)
Title: Re:Need help with doFollow
Post by: Meatball0311 on 16 Dec 2005, 07:41:02
Wait, there is one problem.  when I tell my RTO to board a helo it gets in then it gets out, it gets in then gets out, etc.  I tried it both already in the helo and also telling it to get in without me.  What can I do to keep it in helo.
Title: Re:Need help with doFollow
Post by: macguba on 16 Dec 2005, 11:34:10
You probably need to stop the following script.

If you want to improve the following script, make the delay a bit longer and a distance check, so that if he is already close to you he stays where he is, rather than trying to cuddle up.
Title: Re:Need help with doFollow
Post by: Meatball0311 on 16 Dec 2005, 16:06:39
Great, now how do you do a distance check?
Title: Re:Need help with doFollow
Post by: marcus3 on 16 Dec 2005, 18:28:21
ok i made up a little mission for yah  ;)
one thing...how can u tell him to board the helo if he is not in your group?
and..if he is in your group, why would u need a follow script? anywas here is the mission  ;D
Title: Re:Need help with doFollow
Post by: Meatball0311 on 16 Dec 2005, 21:47:08
Big Boss Man once again you da' man!

Thanks, it is working well and I think it is going to allow me to do what I want.  To tell you and all that are reading this post what exactly I am using this for I think would help alot of OFP studs out.  I have come across Gen Barrons Hand Signal Communication System,(which you can find in the mod section) and really enjoy having it.  I recently got out of the Marines and served two tours in Iraq as an 0311 (Rifleman), with the most powerful and disciplined fighting force of all time, the 1st Marine Division.  What I love and to be frank since I am a Combat Veteran, is that OFP is the closest simulation to combat that you can find.  It allows you to do almost anything that our great military can really do.  The HS Com System, brings OFP one step colser to realisim.  HS uses standard hand and arm signals which is used in our military.  However there is some problems with it (just like anything nothing is perfect)  One problem is that the RO (Radio Operator) does not stick to the side of the Platoon or squad leader.  With this much appreciated scripting it now allows the player to have the RO by him at all times and can still be ordered to do other things.  You see in the HS com system the RO or RTO is in a seperate group.  So are your Fire Teams, this allows you to control more personel.  As you can tell I am a beginner in making scripts and I do appreciate everyones help and suggestions.  I can guarantee that I will have more questions.  Thanks to all and Merry Christmas, God Bless America and the world.

The Meatball