Page 1 of 1
random att/def
Posted: Fri Jan 28, 2011 12:30 am
by THEWULFMAN
Would it be possible to have a lua script that randomizes which team is attacking and which is defending, like the random weather? If so, how? Thanks in advance.
Note, I am really bad a lua scripting, at least anything advanced.
Re: random att/def
Posted: Fri Jan 28, 2011 12:36 am
by kinetosimpetus
I did this in Rhen Var: Canyon.
Code: Select all
ATT = 1
DEF = 2
--this never changes, ever, no really, i mean it, lol.
if not ScriptCB_InMultiplayer() then
ALL = math.random(1,2)
IMP = (3 - ALL)
else
IMP = 1
ALL = 2
end
--tada, now the teams will randomly switch which side of the map they are on, :D
--not for use it space, or campaigns, or multiplayer.
Re: random att/def
Posted: Fri Jan 28, 2011 12:39 am
by THEWULFMAN
Thanks alot, testing now.