Dummy Teamcapture region? *edited*

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

Dummy Teamcapture region? *edited*

Post by MetalcoreRancor »

I've come here with a question, and I'm not sure if its been though of or done before, but basically I am making a map where theres a new 'Gauntlet' mode to go along with my maps theme, and I have successfully arranged it so the capture the flag elements work. That being said, I want to set up some "dummy" regions that give the same beacon as the homebase region, but not actually supply a working flag zone, but rather act as a trap and use a control zone walk on thing to make you stuck in the area, and have nasty things attack you.

I can pretty much figure out the rest on my own, but setting up this dummy region with the map beacon is whats troubling me. Any suggestions on how to do it?

*edit*

I realized it was the teamcaptures that I wanted to make dummies of.

Still same question.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

RE: Dummy Teamcapture region? *edited*

Post by [RDH]Zerted »

You want the map marker functions.

Here are some examples:

Code: Select all

MapAddClassMarker("all_inf_officer_jungle", "hud_objective_icon_circle", 3.5, ATT, "YELLOW", true)
MapAddClassMarker("cis_walk_spider", "hud_target_hint_onscreen", 3.0, ATT, "YELLOW", true)
MapAddClassMarker("gar_inf_naboo_queen", "hud_objective_icon", 3.5, ATT, "YELLOW", true)
MapAddClassMarker("geo_inf_acklay", "hud_objective_icon_circle", 3.5, ATT, "YELLOW", true)
MapAddClassMarker("jed_knight_01", "hud_objective_icon", 3.5, ATT, "YELLOW", true)
MapAddClassMarker("jed_master_01", "hud_objective_icon_circle", 3.5, ATT, "YELLOW", true)
MapAddClassMarker("jed_master_02", "hud_objective_icon_circle", 3.5, ATT, "YELLOW", true)
MapAddClassMarker(t.classname, t.icon, t.iconScale, self.teamATT, "YELLOW", true)
MapAddEntityMarker("ATTE2", "hud_objective_icon_circle", 4.0, ATT, "YELLOW", true)
MapAddEntityMarker("CAM_CP1", "hud_objective_icon_circle", 3.0, ATT, "YELLOW", true, true, true)
MapAddEntityMarker("CAM_CP2", "hud_objective_icon_circle", 4.0, ATT, "YELLOW", true)
MapAddEntityMarker("cp5", "hud_objective_icon", 3.0, ATT, "YELLOW", true, true, true)
MapAddEntityMarker("enemyspawn2", "hud_objective_icon", 4.0, ATT, "YELLOW", true)
MapAddEntityMarker("force_shield_01", "hud_objective_icon", 3.0, 1, "YELLOW", true)
MapAddEntityMarker("newenemyspawn", "hud_objective_icon", 4.0, ATT, "YELLOW", true)
MapAddEntityMarker("oil", "hud_objective_icon", 3.0, 1, "YELLOW", true)
MapAddEntityMarker("repveh6", "hud_objective_icon", 3.0, 1, "YELLOW", true)
MapAddEntityMarker("shi-ject", "hud_objective_icon", 3.0, 1, "YELLOW", true)
MapAddEntityMarker("shield_object", "hud_objective_icon", 3.0, 1, "YELLOW", true)
MapAddEntityMarker("temple_door_trigger", "hud_objective_icon_circle_circle", 4.0, ATT, "YELLOW", true)
MapAddEntityMarker(GetCharacterUnit(GetTeamMember(flag_rebel, 0)), "hud_objective_icon_circle", 4.0, ATT, "YELLOW", true)
MapAddEntityMarker(GetCharacterUnit(carrier), "hud_target_flag_onscreen", 4.0, ATT, "YELLOW", true)
MapAddEntityMarker(capRegionDummyObject, capRegionMarker, capRegionMarkerScale, team, "YELLOW", bPulseCapRegion, false, bPulseCapRegion)
MapAddEntityMarker(cp.name, self.icon, 4.0, self.teamATT, "YELLOW", true)
MapAddEntityMarker(flag, icon.texture, icon.scale, self.team)
MapAddEntityMarker(flag, self.icon[flag].texture, self.icon[flag].scale, self.team)
MapAddEntityMarker(flag.name, flag.mapIcon, 4.0, carrierTeam, "YELLOW", true, false, true, true)
MapAddEntityMarker(postPtr, self.icon, 4.0, self.teamATT, "YELLOW", true)
MapAddEntityMarker(self.flag, self.flagIcon, self.flagIconScale, team, "YELLOW", true, false, true, true)
MapAddEntityMarker(t.name, t.icon, t.iconScale, self.teamATT, "YELLOW", true)
MapAddRegionMarker(GetRegion(capRegion), capRegionMarker, capRegionMarkerScale,
MapAddRegionMarker(GetRegion(flag.captureRegion), flag.capRegionMarker, 4.0,
MapAddRegionMarker(self.regionName, self.mapIcon, 2.5, self.teamATT, "YELLOW", true)
MapAddRegionMarker(self.regionName, self.mapIcon, 2.5, self.teamDEF, "YELLOW", true)
The first parameter is the object/class/entity/region name and the second parameter is the map icon. I think the third is the map icon's size and the fourth is the team which will be able to see the marker. I'm not sure what the rest of the parameters do, but I assume they do something.

To remove the markers, change Add to Remove and pass in the name of the object/class/entity/region. Examples:

Code: Select all

MapRemoveClassMarker("jed_knight_04")
MapRemoveClassMarker(t.classname, self.teamATT)
MapRemoveEntityMarker("ATTE2")
MapRemoveEntityMarker("CAM_CP1")
MapRemoveEntityMarker("temple_door_trigger")
MapRemoveEntityMarker(GetCharacterUnit(GetTeamMember(flag_rebel, 0)))
MapRemoveEntityMarker(GetCharacterUnit(carrier))
MapRemoveEntityMarker(capRegionDummyObject)
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

Post by MetalcoreRancor »

where do I find these? If so, this will help alot. Thanks =]
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

MetalcoreRancor wrote:where do I find these? If so, this will help alot. Thanks =]
Those are all examples from the campaign scripts.
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Ace_Azzameen_5 »

I recommend adding this to the FAQ as a OBJECTIVE MARKER tutorial.
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

Post by MetalcoreRancor »

Ok, so I've decided to go for a different approach to my map's original plan.

The problem is, I cant for the life of me figure out how to make it so animations are triggered by a region. Here's my .lua codes.

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 = "homeregion",
captureRegionATT = "team1_capture", captureRegionDEF = "team2_capture",
capRegionMarkerATT = "hud_objective_icon_circle", capRegionMarkerDEF = "hud_objective_icon_circle",
capRegionMarkerScaleATT = 3.0, capRegionMarkerScaleDEF = 3.0, multiplayerRules = true}
--Turn on the region
ActivateRegion("TrigMov1")

--Then You need to use the region

region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then

PauseAnimation("doorslam1")
RewindAnimation("doorslam1")
PlayAnimation("doorslam1")

end
end,
"TrigMov1"
)


--Turn on the region
ActivateRegion("TrigMov1")

--Then You need to use the region

region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then

PauseAnimation("doorslam2")
RewindAnimation("doorslam2")
PlayAnimation("doorslam2")

end
end,
"TrigMov1"
)

ctf:Start()


EnableSPHeroRules()

end

My idea was to make it so when you enter the area with the ctf base, the exits close and your stuck, left to die. I hope to make this work with the other locations, and all of this hinges on me getting this work. Any help?

I should mention I made the doors, the animations and region in the ctf1 layer, I think that may be my issue, but I want your guy's opinion.
Post Reply