Hello,
Thanks for reply, I fixed the createunit problem but I have some more problem needed to solve.
My problem is: the fourth Shilka won't move because there are no crews inside.
I created 5 Game logics, g2a to g2d are the four Shilka location and g2e is the place where the crews are created.
I created a Shilka called 'shilka' which removed using deletevehicle.
Please check the following script and please tell me if i made any mistakes.
Note: g4a is the waypoint of the four Shilkas.
-----------------------------------------------------------------------------
; Create shilka
; 1st ZSU
shilka1 = "ZSU" createvehicle getpos g2a
~1
"SoldierECrew" createunit [getpos g2e, shilka, "s1a = this", 1, "SERGEANT"]
"SoldierECrew" createunit [getpos g2e, shilka, "s1b = this", 1, "CORPORAL"]
"SoldierECrew" createunit [getpos g2e, shilka, "s1c = this", 1, "PRIVATE"]
~1
s1b moveincommander shilka1
s1a moveingunner shilka1
s1c moveindriver shilka1
; 2nd ZSU
shilka2 = "ZSU" createvehicle getpos g2b
~1
"SoldierECrew" createunit [getpos g2e, shilka, "s2a = this", 1, "SERGEANT"]
"SoldierECrew" createunit [getpos g2e, shilka, "s2b = this", 1, "CORPORAL"]
"SoldierECrew" createunit [getpos g2e, shilka, "s2c = this", 1, "PRIVATE"]
~1
s2b moveincommander shilka2
s2a moveingunner shilka2
s2c moveindriver shilka2
; 3rd ZSU
shilka3 = "ZSU" createvehicle getpos g2c
"SoldierECrew" createunit [getpos g2e, shilka, "s3a = this", 1, "SERGEANT"]
"SoldierECrew" createunit [getpos g2e, shilka, "s3b = this", 1, "CORPORAL"]
"SoldierECrew" createunit [getpos g2e, shilka, "s3c = this", 1, "PRIVATE"]
~1
s3b moveincommander shilka3
s3a moveingunner shilka3
s3c moveindriver shilka3
; 4th ZSU
~1
shilka4 = "ZSU" createvehicle getpos g2d
"SoldierECrew" createunit [getpos g2e, shilka, "s4a = this", 1, "SERGEANT"]
"SoldierECrew" createunit [getpos g2e, shilka, "s4b = this", 1, "CORPORAL"]
"SoldierECrew" createunit [getpos g2e, shilka, "s4c = this", 1, "PRIVATE"]
~1
s4b moveincommander shilka4
s4a moveingunner shilka4
s4c moveindriver shilka4
; Create waypoints
shilka1 domove (getpos g4a)
shilka2 domove (getpos g4a)
shilka3 domove (getpos g4a)
shilka4 domove (getpos g4a)
---------------------------------------------------------------------------
Thanks for looking the post.
Thanks,
Timmy