Hello GameToast,
Is there any way of using the LUA code: SetAIDifficulty() at differant times using the LUA
(for example, when say the CIS capture a certain CP, the Republic become more difficult or visa-vursa)?
Help will be much appreciated.
Script different difficulties at different times?
Moderator: Moderators
- Filipinio
- Master Sergeant

- Posts: 178
- Joined: Fri Jan 22, 2010 3:29 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Mygeeto's Bridge Battle's
-
Aman/Pinguin
- Jedi

- Posts: 1104
- Joined: Tue Jan 30, 2007 6:04 am
- Projects :: Inactive
- Location: Germany
Re: Differant Difficulty's - Dirrerant Times
Not sure if changing the difficulty while the map is running works, but the correct code would be:
That would apply to every Commandpost though. For a single CP it would be something like
Typed most of it from head, so there might be mistakes.
Code: Select all
OnFinishCaptureTeam(
function(cPost)
local pName = GetEntityName(cPost)
SetAIDifficulty(2, whatever, "whatever")
end,
1
)
OnFinishCaptureTeam(
function(cPost)
local pName = GetEntityName(cPost)
SetAIDifficulty(1, whatever, "whatever")
end,
2
)Code: Select all
OnFinishCaptureTeam(
function(cPost)
local pName = GetEntityName(cPost)
if pName == "cp1" then
SetAIDifficulty(1, whatever, "whatever")
end
end,
2
)