Page 1 of 1

My First Post: Wookie help

Posted: Wed Jan 22, 2014 6:01 pm
by skywalker
Hello. I need help with a problem. I have been making my map and I have an area were I don't want my wookies to spawn. I put some codes in my lua before so I was wondering if there is some code that I can put in my lua to kill the wookies when they spawn at cp5, or a code that will make them unable to spawn at cp5 :runaway: ? Can some one PLEASE help :shock:

Re: My First Post: Wookie help

Posted: Wed Jan 22, 2014 7:53 pm
by Kingpin
Are the wookies locals or are they playable on a team? (like the wookies on the Rebel Alliance)

Re: My First Post: Wookie help

Posted: Wed Jan 22, 2014 10:07 pm
by skywalker
They are the wookies that are under the "all" team, so I guess they are part of the Rebel Alliance. (They just came with my yavin map)

Re: My First Post: Wookie help

Posted: Thu Jan 23, 2014 5:04 pm
by Lorul1
okay
are you trying to do something like this ?
forums/viewtopic.php?f=27&t=29648

Re: My First Post: Wookie help

Posted: Thu Jan 23, 2014 7:33 pm
by skywalker
yep that's what I want but there is a problem I inserted the code at the end of your post into my lua and it didn't work. :runaway:
Hidden/Spoiler:
[code]conquest:Start()

timeoutTimer = CreateTimer("timeout")
SetTimerValue(timeoutTimer, 10)

OnTimerElapse(
function(timer)
MissionVictory(REP)
ShowTimer(nil)
DestroyTimer(timer)
end,
timeoutTimer
)

OnObjectKill(
function(object, killer)
if GetEntityName(object) == "myg1_bldg_energy_collector_core" then
PlayAnimation("final")
PlayAnimation("fallfire")
StartTimer(timeoutTimer)
ShowTimer(timeoutTimer)
end
end
)

OnCharacterSpawn(
function(character)
if GetCharacterClass(character) == "jed_knight_03" then
checkJediRegion()
end
end
)


--put this after ScriptPostLoad() but before ScriptInit()
checkJediRegion()
OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
print("Do nothing because jedi is human")
elseif GetCharacterClass(player) == "jed_knight_03" then
KillObject(player)
end
end,
"Kill01"
)
end[/code]

can someone please help :cry: