Home   Help Search Login Register  

Author Topic: two questons  (Read 1355 times)

0 Members and 1 Guest are viewing this topic.

GeneralCoder

  • Guest
two questons
« on: 29 Sep 2002, 12:54:50 »
First whats wrong whit this code, it spose to move soldier "gg1" to gun1 and when that soldier dies a new soldier named "gg2" should go in.
And the problem is that gg2 doest move to gun even gg1 is dead and some times even the gg1 doesnt goto gun either.

and yes i have but the "this assignasgunner gun1" to both of them

#loop

;hint"here"

? (Alive gg1) : [gg1] OrderGetIn true; goto"loop"

? (Alive gg2) : [gg2] OrderGetIn true; goto"loop"

exit

//////////////////////////////

next quston how do u make unit sit? i have done this before but i just cant make those fools to sit (yes they have safe behaviour)
so could some one give sample of this?

gg1 action [STR_ACTION_SITDOWN]

 :-\
« Last Edit: 29 Sep 2002, 12:56:16 by GeneralCoder »

_54th_Yoshi

  • Guest
Re:two questons
« Reply #1 on: 29 Sep 2002, 16:46:42 »
Quote
#loop

;hint"here"

? (Alive gg1) : [gg1] OrderGetIn true; goto"loop"

? (Alive gg2) : [gg2] OrderGetIn true; goto"loop"

exit
Correct me if i'm wrong but shouldn't it be...
Code: [Select]
#loop

;hint"here"

? (Alive gg1) : [gg1] OrderGetIn true; goto"loop"

?! (Alive gg1) : [gg2] OrderGetIn true; goto"loop"

exit

GeneralCoder

  • Guest
Re:two questons
« Reply #2 on: 29 Sep 2002, 21:35:59 »
Quote
#loop

;hint"here"

? (Alive gg1) : [gg1] OrderGetIn true; goto"loop"

? (Alive gg2) : [gg2] OrderGetIn true; goto"loop"

exit
Correct me if i'm wrong but shouldn't it be...
Code: [Select]
#loop

;hint"here"

? (Alive gg1) : [gg1] OrderGetIn true; goto"loop"

?! (Alive gg1) : [gg2] OrderGetIn true; goto"loop"

exit

Its the same becose in both scripts [gg2] OrderGetIn true; isnt executed until gg1 is dead.

how about that sit down thing, any one?

Chudley

  • Guest
Re:two questons
« Reply #3 on: 30 Sep 2002, 02:38:19 »
For the 1st question, use this

gg1 moveingunner gun1
gg2 assignasgunner gun1

#Loop
?(!alive gg1): goto "Replace"

~0.1
goto "Loop"


#Replace
gg2 ordergetin true

exit
------------------------------------------------------------

For the 2nd question, do this...

In the unit's INIT field, type this...
[unitName] switchMove "effectstandsitdown"

But to make sure he doesn't stand right back up....
[unitName] setBehaviour "CARELESS"; doStop [unitName]

Put this line in BEFORE the script execution.

:D Hope this helps


GeneralCoder

  • Guest
Re:two questons
« Reply #4 on: 01 Oct 2002, 21:35:46 »
For the 1st question, use this

gg1 moveingunner gun1
gg2 assignasgunner gun1

#Loop
?(!alive gg1): goto "Replace"

~0.1
goto "Loop"


#Replace
gg2 ordergetin true

exit

that movein isnt the best option becose units goes in instantly, but thanks for that sit thingy  :)

Chudley

  • Guest
Re:two questons
« Reply #5 on: 01 Oct 2002, 21:49:48 »
Well, why don't u stick in a pause??

i.e.....

~10 (pauses for 10 seconds before movng to the next line of the script).

:D