Forum Jump :

Author Message

Posts: 74

Level: Member

Country: de
In-game name:

#1 Posted at 2013-03-13 18:11        
So here is what i got:

grp3=creategroup east;  "O_Soldier_GL_F" createunit [getmarkerpos "sp2", grp3, "le2=this; removeallweapons this", 0.5, "CAPTAIN"]; 

its working fine and doin whats supposed to. now what i wanna do is the game to choose a different unit in like say 1 out of 10 times. does anybody have a clue how to do this?


update: here is what i am thinking:

init line of player:

placeholder1 = random 10

then have 2 triggers one that goes off at any number up to 10 and one that goes off at 10.

Added 9 minutes later:

Well, Lol!

It actually worked. I only needed one trigger that says:

grp3=creategroup east;  if (number < 10) then {"O_Soldier_GL_F" createunit [getmarkerpos "sp2", grp3, "le2=this; removeallweapons this", 0.5, "CAPTAIN"];} else {"O_Soldier_GL_F" createunit [getmarkerpos "sp2", grp3, "le2=this;", 0.5, "CAPTAIN"];}

now one out of 10 times an equipped soldier spawns, all the other times one with no weapons...

This post was edited by griesgram (2013-03-13 18:24, ago)