garbol87 10 Posted April 28, 2011 I need help whit one thing. I have an object let's call it "Phone1" and two positions in which the "Phone1" will spawn (one of two positions). Now this wouldn't be a problem if the object was bigger and using empty markers and grouping them. The trick is that it's a much smaller object and I wan't it to be inside a house (XYZ). Example of what I want to achive: Phone1 setposasl [874.068,1133.73,413.196] [b]OR[/b] Phone1 setposasl [960.818,1304.64,384.26]; Yeah, I know it's not right. Please help :confused: Share this post Link to post Share on other sites
joske 10 Posted April 28, 2011 try this chance = random 1; _num = round chance; if (_num == 0 ) then { Phone1 setposasl [874.068,1133.73,413.196]; }; if (_num == 1) then { Phone1 setposasl [960.818,1304.64,384.26]; }; Share this post Link to post Share on other sites
Razor91 17 Posted April 29, 2011 Here´s a shorter variant: chance = random 1; _num = round chance; if (_num == 0) then { Phone1 setposasl [874.068,1133.73,413.196]; } else { Phone1 setposasl [960.818,1304.64,384.26]; }; Share this post Link to post Share on other sites
demonized 20 Posted April 29, 2011 Even shorter ;) _pos = [[874.068,1133.73,413.196],[960.818,1304.64,384.26]] select (round (random 1)); Phone1 setPosAsl _pos; Share this post Link to post Share on other sites
Razor91 17 Posted April 29, 2011 Okay, okay, this is even shorter:D Share this post Link to post Share on other sites