Home   Help Search Login Register  

Author Topic: How to create man with trigger(2 part)  (Read 642 times)

0 Members and 1 Guest are viewing this topic.

Adamsjebo

  • Guest
How to create man with trigger(2 part)
« on: 29 Oct 2003, 17:22:53 »
Hi there, can anyone tell me how to create a single unit with a trigger? Also I would appreciate it if anyone could list the the unit names in ofp for this command. thanx all.

Komuna

  • Guest
Re:How to create man with trigger(2 part)
« Reply #1 on: 29 Oct 2003, 17:30:36 »
Is easy. All you must have is the "createUnit" command and its syntax.

It must be something like this:

"SoldierWB" createUnit [position player, group player, ""]

Of course, there are more paramters than the ones I've specified within the array.

Adamsjebo

  • Guest
Re:How to create man with trigger(2 part)
« Reply #2 on: 29 Oct 2003, 19:25:28 »
Can somebody please give me the full command line, to create the unit where the trigger is?

Komuna

  • Guest
Re:How to create man with trigger(2 part)
« Reply #3 on: 30 Oct 2003, 12:51:51 »
Name your trigger (e.g.: MyTrig). Place the following command at its activField:

Code: [Select]
"SoldierWB" createUnit [position MyTrig, groupAlpha, ""]
You can't use 'this' in triggers, as it won't recognize it. 'thislist' (not mentioned yet, but usefull) is an array of every unit which activated the trigger - or that is currently inside it.

R3dF0x

  • Guest
Re:How to create man with trigger(2 part)
« Reply #4 on: 30 Oct 2003, 15:00:16 »
Is there a way to get the size of the 'thislist' array then, to see how many units are there?

Komuna

  • Guest
Re:How to create man with trigger(2 part)
« Reply #5 on: 30 Oct 2003, 15:03:37 »
count _array

It returns the num of elements within it.