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.
random att/def
Moderator: Moderators
-
THEWULFMAN
- Space Ranger
- Posts: 5557
- Joined: Tue Aug 17, 2010 3:30 pm
- Projects :: Evolved 2
- Location: Columbus, Ohio
- Contact:
-
kinetosimpetus
- Imperial Systems Expert

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: random att/def
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.
Last edited by kinetosimpetus on Fri Jan 28, 2011 12:43 am, edited 1 time in total.
-
THEWULFMAN
- Space Ranger
- Posts: 5557
- Joined: Tue Aug 17, 2010 3:30 pm
- Projects :: Evolved 2
- Location: Columbus, Ohio
- Contact:
Re: random att/def
Thanks alot, testing now.
