Home   Help Search Login Register  

Author Topic: CreateUnit damn you!!!  (Read 933 times)

0 Members and 1 Guest are viewing this topic.

merby1

  • Guest
CreateUnit damn you!!!
« on: 08 Jan 2006, 04:46:11 »
Hey, sorry for the amazingly stupid question but...
I've refered to the comm ref and the tutorials about spawning units but cannot get the damn thing to create.
I've tried inserting marker: "rus1"
_chaser1 = "JAM_EBOfficer" createVehicle getmarkerpos "rus1"
and
"JAM_EBOfficer" createUnit [getmarkerpos "rus1"]

but i still cant find him.
Can u create units in your cut scenes?
Sorry I have no idea why this isnt working.
Mark

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:CreateUnit d**n you!!!
« Reply #1 on: 08 Jan 2006, 06:36:33 »
From the comref: CreateUnit

type createUnit unitInfo

"Format of unitInfo is: [pos (Position),group (Group), init (String), skill (Number), rank (String)] Note: init, skill, and rank are optional"

Quote
Backoff  November 01, 2002, 08:12
The Group parameter MUST be an existing group or the unit won't be created.

To create a unit, you must first have a reference to an existing group. You cannot create new groups; this group must already exist at the beginning of this mission.

The easiest way to do this is to place a soldier in the editor, probability of presence = 0, and in his init field put something like "Spawn_group = group this"

In your script put

"JAM_EBOfficer" createUnit [getmarkerpos "rus1", Spawn_group ]
« Last Edit: 08 Jan 2006, 06:37:01 by Fragorl »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:CreateUnit d**n you!!!
« Reply #2 on: 08 Jan 2006, 14:10:46 »
createVehicle is a badly worded command.   Although in OFP "vehicle" usually includes soldiers, in this case it does not.    Use this command if you want to create an empty tank, car, etc. somewhere.

Use camCreate if you want to create an object such as a table.

Use createUnit if you want to create a soldier.
Plenty of reviewed ArmA missions for you to play

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:CreateUnit d**n you!!!
« Reply #3 on: 08 Jan 2006, 20:38:52 »
ok, I have a very simmaler problem.

Im trying to create a BMP1 at a gamelogic. it wont work,
im trying

bmp1 = "BMP1" createvehicle getpos g1

nothing happens.

thanks

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:CreateUnit d**n you!!!
« Reply #4 on: 08 Jan 2006, 22:37:47 »
Try:

bmp1 = "BMP" createvehicle getpos g1


Planck
I know a little about a lot, and a lot about a little.