Home   Help Search Login Register  

Author Topic: Respawn in boat, disembark....  (Read 1502 times)

0 Members and 1 Guest are viewing this topic.

Offline Barbolani

  • Members
  • *
Respawn in boat, disembark....
« on: 13 Nov 2011, 13:21:31 »
Hello all!

I have not encountered problems with this yet, but the thing is I need my code optimized because the mission I'm planning is huge in terms of amount of units and AI enhacement.

What I want to do is, a typical boat landing and beach head mission with this procedure.

Player and its group starts in a boat. Boat reaches the shore, group disembarks.

Boat goes back to the LST

Boat gets filled of Infantry of random types (with some logic, it must be impossible to fill it with 4 medics, for example)

Boat goes back to the shore

Cargo diembarks and after it, joins group player

If boat gets killed, runs out of fuel, whatever, another boat is spawned with some penalty delay

In my limited scripting skills, the problem is to give routs and waypoints to newly created groups.

And also, If I make my typical sqs with 250 lines, won't be very optimized.

So, do you know any premade script that fits on most of the idea so I can tweak it easily?

Thanks ind advance, as allways!!!

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Respawn in boat, disembark....
« Reply #1 on: 01 Jan 2012, 10:27:06 »
SQF gurus could help you better if you provided your script in sqs. Otherwise, what you're wanting to do is fairly simple if you knew the right commands. Check out the comref and browse through it. You'd be amazed at what is there and how simple it would be to do something like this, even with sqs and still be efficient.

Looks like a few of the commands that would help you right of the bat are///
CreateVehicle or CreateUnit will help you create the units and move them into the boat once the boat gets back to the ship. You could also remove all of their weapons and add new ones as you create them. Check out the weapon lists in our comref too. Once you have all boat slots filled, send it back to the shore by adjusting a global variable that will allow a waypoint to complete, letting it continue. At that next waypoint, it could be transport unload where the boat auto unloads it's cargo. When it does that, the waypoint completes and you could insert a join command ( or joinsilent)for each of those created units by slow looping that creation script until their vehicle is not equal OR (not equal) to the boats name.
Use setfuel to keep it fueled up and setcaptive to prevent it from coming under enemy fire. Of if you prefer the reality of fire, setdammage to keep it alive.
Hope it helps pal. Happy editing.
« Last Edit: 01 Jan 2012, 10:28:46 by savedbygrace »