Home   Help Search Login Register  

Author Topic: Constant Stream of Convoys  (Read 484 times)

0 Members and 1 Guest are viewing this topic.

minimilo

  • Guest
Constant Stream of Convoys
« on: 23 Jul 2004, 21:27:01 »
Im thinking of a mission to take place on Nogova, where i am the leader of a squad of 12 men, andc i go around the island destroying convoys, tank columns etc, but i dont know how to "create" units mid-mission, if there is a guide for this, could someone please give me a link to it, thanks in advance for any help

edit: also, i dont want the units to re-spawn, i just want units to be rendomly created every now and again, pref at the airport, if that makes any difference
« Last Edit: 23 Jul 2004, 21:29:45 by minimilo »

CopyrightPhilly

  • Guest
Re:Constant Stream of Convoys
« Reply #1 on: 23 Jul 2004, 21:32:53 »
got the following from the Command Reference

Operand types:
type: String
unitInfo: Array
Type of returned value:
Nothing
Description:
Create unit of given type . Format of unitInfo is: [pos (Position),group (Group), init (String), skill (Number), rank (String)] Note: init, skill, and rank are optional, default values are "", 0.5, "PRIVATE".

Example:
"SoldierWB" createUnit [getMarkerPos "barracks", groupAlpha]



that will make a unit

hope this helps a little

cheers, Philly

 

minimilo

  • Guest
Re:Constant Stream of Convoys
« Reply #2 on: 23 Jul 2004, 21:51:37 »
to be honest, i dont understand s**t about that, is there any tutorials for it, or ne thin like that, in the meantime, ill try to get an understanding of it

CopyrightPhilly

  • Guest
Re:Constant Stream of Convoys
« Reply #3 on: 23 Jul 2004, 22:38:59 »
i couldnt find a tut for this so i will try to explane it best i can...

ok look at this




"SoldierWB" createUnit [getpos object, player]




ok soldierWB is the name of the soldier class,now  the next part

getpos object
this is where it will place the soldier, object can be a name of a soldier or a name of a object.

now the last part
player
this is the name of the soldier that you it to join

here the soldier class's that i know of

West Soldiers:
SOLDIERWLAW
SOLDIERWSNIPER
SOLDIERWMG
SOLDIERWAT
SOLDIERWAA
OFFICERW
SOLDIERWMINER
SOLDIERWG
SOLDIERWMEDIC
SOLDIERWSABOTEURPIPE

East Soldiers:
SOLDIERELAW
SOLDIERESNIPER
SOLDIEREMG
SOLDIEREAT
SOLDIEREAA
OFFICERE
SOLDIEREMINER
SOLDIEREG
SOLDIEREMEDIC
SOLDIERESABOTEURBIZON


I Hope This Helps

Cheers, Philly


edit: rewrote because Artak was right...
« Last Edit: 23 Jul 2004, 22:58:44 by CopyrightPhilly »

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Constant Stream of Convoys
« Reply #4 on: 23 Jul 2004, 22:42:09 »
If you do a 'quicksearch' with keywords 'createunit' and 'createvehicle' you'll get some hits and at least one tutorial too. Also, these commands have been dealt with numerous times in the forums, you should find some very good threads about them with the forum search function.

The best advantage in creating the units has to do with reducing cpu strain. That's why they're mostly used in MP missions I think. If you're not struggling with performance issues I'd suggest to insert the units in editor and if needed use the setpos command to move them around. The create spells will require you some effort if you're not that familiar with scripting.

/edit
Just noticed the above example. It won't work because the command is missing some parameters. Mainly the group which the unit will be created in.
« Last Edit: 23 Jul 2004, 22:44:42 by Artak »
Not all is lost.

CopyrightPhilly

  • Guest
Re:Constant Stream of Convoys
« Reply #5 on: 23 Jul 2004, 23:00:24 »
thanks for point that out Artak i rewrote it...

cheers, Philly