Home   Help Search Login Register  

Author Topic: Get moving, you bastard :)  (Read 872 times)

0 Members and 1 Guest are viewing this topic.

SimonRussi

  • Guest
Get moving, you bastard :)
« on: 28 Apr 2003, 08:52:00 »
I need to create units in a place and then make them moving to a position. I wrote this:

_soldier = "Soldier" createvehicle [x,z]
_soldier move [x1,z1]

guess what? He shows up and goes nowhere.
I tried this:

"Soldier" createunit [xz, group, "this domove [x1,z1]"]

guess what? fucking the same.

Now, can somebody teach me how to kick this lazy bastard and make him moving?

Thanks,
Simon

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Get moving, you bastard :)
« Reply #1 on: 28 Apr 2003, 14:46:48 »
wat group didu give him ? ;)

nywayz wat u shud do is smin like dat (its script right ?)

Code: [Select]
"Soldier" createunit [[x,z,y], group, "_soldier = this"]
_soldier domove [x1,z1]

it may work  :o  ;D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

SimonRussi

  • Guest
Re:Get moving, you bastard :)
« Reply #2 on: 28 Apr 2003, 14:55:07 »
ok LCD, we are almost done :).

It works now, the unit start running toward the destination. But, what if I want him to be a group itself. I mean, i used this

"Soldier" createunit [[x,z,y], group unitxx, "_soldier = this"]

what if unitxx dies? And, since I use this to generate units randomly, what happens when the group grows over 12 elements?


Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Get moving, you bastard :)
« Reply #3 on: 28 Apr 2003, 14:59:48 »
it suposed 2 work if he is grouped also ;D

but i didnt know u can do it w/o sayin wich group u r groupin da unit to ::)

if da unit dies da group is likly 2 stil b da same group ;D

nd wen da group have 12 units it stops creatin units ;D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

SimonRussi

  • Guest
Re:Get moving, you bastard :)
« Reply #4 on: 28 Apr 2003, 15:04:16 »
do you know if i can group the created units with a gamelogic or something so that the group leader will never die?

about the 12 elements trick: will the creation start again when the group units number is below 12 elements again?

Iwesshome

  • Guest
Re:Get moving, you bastard :)
« Reply #5 on: 28 Apr 2003, 15:19:40 »
I guess you could create a simple script that will always keep the leader nice and healthy.

Code: [Select]
;[unitname] exec "alive.sqs"

_loon1 = _this select 0

#start
?!(alive _loon1): exit
_loon1 setdamage 0
~1
goto "start"

IW
« Last Edit: 28 Apr 2003, 15:26:13 by IW »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Get moving, you bastard :)
« Reply #6 on: 28 Apr 2003, 18:33:00 »
I think you can make the group leader a gamelogic.     Or you could put him on an outlying island where he can't come to any harm.
Plenty of reviewed ArmA missions for you to play

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Get moving, you bastard :)
« Reply #7 on: 28 Apr 2003, 18:47:28 »
Quote
about the 12 elements trick: will the creation start again when the group units number is below 12 elements again?

yes it wil continue ;D

Quote
do you know if i can group the created units with a gamelogic or something so that the group leader will never die?

u can put da group leader far away ;D

but if u put him GL i think da side of da units created wil b GLs nd dats  meens dey wont kill oders  :-X

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

deaddog

  • Guest
Re:Get moving, you bastard :)
« Reply #8 on: 29 Apr 2003, 06:03:47 »
You could also do this:

place a unit in the editor
type in the init field:  mygroup=group this;deletevehicle this

The groupname is created and is still there after the unit is deleted.  The groupname can be used in the createunit command and you don't have to have a unit off in the bushes somewhere day dreaming.  :)

SimonRussi

  • Guest
Re:Get moving, you bastard :)
« Reply #9 on: 29 Apr 2003, 08:28:00 »
Ok guys, tried the put-the-leader-away trick and it works.
It doesn't work with a gamelogic, the created units don't move.

About the Deaddog trick I will give it a try.

Anyway, thanks you all and topic solved.