OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: smiller on 01 Aug 2005, 14:10:24

Title: Hold waypoints and Units getting out
Post by: smiller on 01 Aug 2005, 14:10:24
I have four sections in four APCs. I want the APCs to stop and for two of those sections to get out. Then for the APCs to proceed to their next waypoint. I've tried to get the command through the ComRef but it's extremely hard to understand when you don't even have basic knowledge of coding. The best I got was to slow the vehicles and have them all eject, but that isn't good enough.

Please help me!

Cheers,
Sam
Title: Re:Hold waypoints and Units getting out
Post by: Silencer on 01 Aug 2005, 22:03:21
I think you can use this script for it:

Reinforcements script (http://www.ofpec.com/editors/browse.php?browseon=&browsewhat=2&category=2_14&subcategory=2_14&numreturn=25&displayformat=0&ofpv=1&searchstring=Silencer&searchwhat=1&searchlevel=0&searchopts=")

Open the .Sqs file in Notepad and you see how you can use it.

Good luck!
Title: Re:Hold waypoints and Units getting out
Post by: smiller on 02 Aug 2005, 06:36:54
Even if I can't it's solved the problem of getting QRF in the mission! I'll have a fiddle and see what I can do.

Thanks,

Sam
Title: Re:Hold waypoints and Units getting out
Post by: Dane on 02 Aug 2005, 07:25:07
Try APCgroup lockWP true
{doStop _X} forEach units APCgroup then
{unassignVehicle _X} forEach units grpincargo
{_X action ["eject", vehicle player]} forEach units grpincargo
Title: Re:Hold waypoints and Units getting out
Post by: smiller on 02 Aug 2005, 09:37:45
Thanks Dane but I need more information. Where do I put this, what do I do with waypoints, triggers etc. What do I need to do for this to work?

Sam
Title: Re:Hold waypoints and Units getting out
Post by: Dane on 02 Aug 2005, 10:02:27
Well, you could have APCgroup lockWP true and {doStop _X} forEach units APCgroup in the Apc's waypoint and the {unassignVehicle _X} forEach units grpincargo
{_X action ["eject", vehicle player]} forEach units grpincargo in a countdown trigger that triggers when the apc reach the waypoint so the groups doesn't start ejecting while the apc's are in motion, but try and play around with it.

or put the whole thing in script like this:
Quote
APCgroup lockWP true
{doStop _X} forEach units APCgroup
~4
{unassignVehicle _X} forEach units grpincargo
{_X action ["eject", vehicle player]} forEach units grpincargo
name it apcunload.sqs

And put in a trigger's activation field: [] exec "apcunload.sqs"

Title: Re:Hold waypoints and Units getting out
Post by: smiller on 02 Aug 2005, 10:05:43
Mate, the problem is that I don't know what to play around with. I look at everything written there and my brain becomes liquid and pours out my ears! That's why I keep coming back and asking for more specific instructions. I do appreciate the help though.

Sam
Title: Re:Hold waypoints and Units getting out
Post by: Dane on 02 Aug 2005, 10:19:00
To make a scriptfile simply create a new tekst document and replace the .txt with .sqs and then just copy the whole thing in the new sqs, and your done.

Quote
becomes liquid and pours out my ears

Stop that! That can't be healthy ;D ;)
Title: Re:Hold waypoints and Units getting out
Post by: smiller on 02 Aug 2005, 10:26:01
I replied before you edited your post. I can create an .sqs, in fact I used to be pretty good at camera scripting but I've been out of the game for a good two years so all knowledge has gone completely!

Just tried the script and it works! The APC slows down briefly to let him out about 15m after the trigger goes off so I'll have a fiddle to get the distance correct.

Thanks again Dane.
Title: Re:Hold waypoints and Units getting out
Post by: Dane on 02 Aug 2005, 10:39:11
No probby.

Well then, good thing you come back now so your skill's are polished when "Game2" get's unleashed.
Title: Re:Hold waypoints and Units getting out
Post by: smiller on 02 Aug 2005, 11:25:18
It's stuffing around! The group goes crazy and some guys even come out with parachutes!

I think this needs another crack.

Sam
Title: Re:Hold waypoints and Units getting out
Post by: Dane on 02 Aug 2005, 11:30:55
Try this:
{_X action ["GETOUT", vehicle player]} forEach units grpincargo, not sure that will work though.
I cant remember if there is a "GETOUT" action.
Title: Re:Hold waypoints and Units getting out
Post by: Dane on 02 Aug 2005, 11:42:21
GET OUT not GETOUT, just looked in the online comref.

Edit. Here is all action commands:
http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=9376 (http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=9376)
Title: Re:Hold waypoints and Units getting out
Post by: smiller on 02 Aug 2005, 13:20:25
I've written:

A3 lockWP true
{doStop _X} forEach units A3
~4
{unassignVehicle _X} forEach units S31
{_X action ["GET OUT", vehicle player]} forEach units S31

A1 lockWP true
{doStop _X} forEach units A1
~4
{unassignVehicle _X} forEach units S21
{_X action ["GET OUT", vehicle player]} forEach units S21

exit

________________________

It's working. The APCs stop and the units get out and hit their next waypoint. However, the APC convoy just stays at there instead of proceeding to it's next waypoint. Could doStop have something to do with this?

Sam
Title: Re:Hold waypoints and Units getting out
Post by: Dane on 02 Aug 2005, 19:33:34
Try lockWP false, i think that will get them moving again.