Page 1 of 1

Pick up the flag, would ya?!

Posted: Thu Dec 21, 2006 11:35 pm
by squipple
Anyone have issues when setting up 1-flag that nobody can pick up the flag? AI, players, anyone, walk right through the flag without picking it up. Can't figure out why. I've compared luas to a working map and a shipped map, and nothing seems to alleviate it.

RE: Pick up the flag, would ya?!

Posted: Thu Dec 21, 2006 11:44 pm
by SymbolS
post your lua

RE: Pick up the flag, would ya?!

Posted: Fri Dec 22, 2006 12:53 am
by Bac-Talan
Could possibly be a problem with the flag object or properties itself. I don't know, this hasn't happened to me.

Posted: Fri Dec 22, 2006 1:40 am
by squipple
Don't know that it'll help, because it's got the same elements as a lua that works in another map, but here's the relevant portions of it.
ScriptCB_DoFile("setup_teams")
Conquest = ScriptCB_DoFile("ObjectiveOneFlagCTF")



-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


function ScriptPostLoad()

SoundEvent_SetupTeams( REP, 'rep', CIS, 'cis' )

ctf = ObjectiveOneFlagCTF:New{teamATT = REP, teamDEF = CIS,
textATT = "game.modes.1flag", textDEF = "game.modes.1flag2",
captureLimit = 5, flag = "flag", flagIcon = "flag_icon",
flagIconScale = 3.0, homeRegion = "flag_home",
captureRegionATT = "team1_capture", captureRegionDEF = "team2_capture",
capRegionMarkerATT = "hud_objective_icon_circle", capRegionMarkerDEF = "hud_objective_icon_circle",
capRegionMarkerScaleATT = 3.0, capRegionMarkerScaleDEF = 3.0, multiplayerRules = true, hideCPs = true}

ctf:Start()

EnableSPHeroRules()

end

--

SetMemoryPoolSize("FlagItem", 1)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:ED9\\ED9.lvl", "ED9_1flag")

RE: Pick up the flag, would ya?!

Posted: Fri Dec 22, 2006 3:23 am
by Rikino
Okay, I may be wrong, but I think I've heard of this before. Try levitating the flag off the ground, make sure it's not sunken into the terrain at all.
If that doesn't work, do both teams have that problem? It might be a problem with whose side the flag is on or something.

Posted: Fri Dec 22, 2006 4:30 pm
by squipple
Yeah, I've tried bringing the flag up off the ground a bit, maybe I just need to bring it up more. It's 1-flag that has the problem. 2-flag works just fine with flags slightly above the ground. I tried renaming and recreating the 'homeregion' as well. I'm guessing I'm on the right track with it having to do with something in ZE or perhaps with the flag object itself, I just don't know what.


EDIT:
This issue has been solved. It was a wierd thing with the relationship between flag/terrain. There was a thin object between the flag and the terrain. I just raised the terrain ever-so-slightly to be inside that object and it works. Wierd.

But in the process I noticed this IMPORTANT NOTE TO REMEMBER: Right out of the initial map setup munge, the ABCg_1flag lua is broken. It has the line:

Code: Select all

SoundEvent_SetupTeams( REP, 'rep', CIS, 'cis' )
and it should be

Code: Select all

SoundEvent_SetupTeams( IMP, 'imp', ALL, 'all' )
If you munge with the improper line, you'll end up with the 150/150 on each side and no AI will spawn.