OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: renegade798 on 26 Jan 2004, 15:40:35
-
Okay, I want a beach landing like Omaha, so I give the driver of the higgen boat they waypoint to the beach, I type in the description box:
Order everyone out
I type in the On Activation box:
Marks globalchat "Ramp's down. Everyone out!"; [mygrp,A] exec "groupgetout.sqs"
(the group's name is Marks and the boat's name is A)
Then I type in the group's INIT box:
mygrp = group this; "_x moveincargo A" foreach units mygrp
Now I got all the stuff to type in the box from a test parachuting mission and just changed a few things. I have a feeling that the problem might be the sqs file (groupgetout) because it was originaly the sqs file for the parachuting mission(groupeject) :-[ . But I'm not sure on how to make an sqs file.
So if you see something I'm doing wrong or just didnt do at all please help.
-thanx
-
Well, you've made a good start. Head over to the Ed Depot and read snYpir's Friendly Intro to Code Snippets and also Johan Gustafsson's Scripting Guide. That will help you get sorted out on the basics of how to handle .sqs files.
The next thing is to make it work with an AI controlled group. Involving a human player is a complication that should only be added when you've got the thing working. Having said that, if the group is controlled by the player then you don't necessarily need to do all this - when the boat hits the beach the player should be smart enough to figure out that he has to order his loons to disembark. (Remember not to use player waypoints to make things happen - people in Veteran mode won't see the waypoints.)
If you want to get loons out of a vehicle that you have moved them into with moveInCargo it's often helpful to give them an assignAsCargo command as well - that way the game really does "know" that they are cargo.
However, you may just be able to do this with waypoints: give the boat a transport unload wp at the beach and the loons in cargo have a getout waypoint. There is an example of this in the Tutorial Mission in the Ed Depot. The group there uses a lorry rather than a boat, but the principle is the same.
-
thanx i'll try that out.
-
if you have problems makeing the boat go staight to that spot you want it to land on you can add a trigger activated by the boat a bit from the beach that sets the fuel to 0.. then if its AI controlled it wont steer.
on activation : boatname setfuel 0
-
You have the "_x moveinCargo..." -stuff allright, m8, but when it comes to
*beachin'* with boats then I'd suggest you simply use waypoints and no scrolls.
Just create the group & the boat, name the boat & moveinCargo the group.
Make sure they're not grouped together (the boat & the men in cargo ), and
then simply put a "Transport Unload" WP for the boat to some place on the beach
(preferrably where the water meets the sand) :)
And then make a "Get Out" waypoint for the group of troopers, hit F5 and
drag a synchr. line between the two waypoints. Then (if you want the boat
to hold still and not spend 10 minutes on a boring brake), you can put the
following syntax in the "Trans. Unload" WP:
this setVelocity [0,0,0]
which will (almost) instantly brake the boat :-*
Later