It is currently Sun May 19, 2013 3:13 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Scripting new gametype
PostPosted: Mon Feb 28, 2011 10:48 am 
Offline
Command Sergeant Major
User avatar

Joined: Thu Jan 20, 2011 3:49 pm
Posts: 262
Location: Somewhere, but most likely where i am
Projects :: Alzoc 3
Games I'm Playing :: Battlefront 2 MW2
Xfire: xundyingxace
xbox live: xundyingxace
Hulla GT, i was wondering if there is any way to script a gametype where you have 50 allies against 50 enemies (teams 3 and 4) and the top says 50 out of 50 and you and the other team (1 and 2) have to kill the ai of the teams 3 and 4 and as they die the 50 out of 50 goes down, when there is none left on teams 3 or 4 then the ally of the team with men left wins? is this possible, ask if you need a better explanation. Thanks :D


Top
 Profile  
 
 Post subject: Re: Scripting new gametype
PostPosted: Mon Feb 28, 2011 10:56 am 
Offline
Chief Warrant Officer
User avatar

Joined: Thu Feb 11, 2010 3:10 pm
Posts: 336
Location: Zeroeditor
Projects :: No Projects I am ready to unveil
Games I'm Playing :: SWBF2-MW2-Madden 08
Xfire: falconrockateer
xbox live: No gamertag set
So to clarify, what you're asking is if you could, for example, have Team 1 and Team 3 as friends, and Team 2 and Team 4 as friends, and make it so you lose or win by Team 3 or 4's reinforcement count instead of your own?


Top
 Profile  
 
 Post subject: Re: Scripting new gametype
PostPosted: Mon Feb 28, 2011 2:13 pm 
Offline
1st Lieutenant
User avatar

Joined: Thu Apr 15, 2010 4:17 am
Posts: 447
Projects :: Server modding
Games I'm Playing :: SWBF2
Xfire: fasty002
I've tried this before and there's no way to show team 3's reinforcements in the HUD but you can give team 3 reinforcements and they will stop spawning when they run out.


Top
 Profile  
 
 Post subject: Re: Scripting new gametype
PostPosted: Mon Feb 28, 2011 4:11 pm 
Offline
Master of the Force
Master of the Force
User avatar

Joined: Wed Nov 12, 2008 9:27 pm
Posts: 4115
Projects :: ZE Terrain Tools
Xfire: fiodis
You could trigger messages when team 3 or 4's reinforcements reach certain points.


Top
 Profile  
 
 Post subject: Re: Scripting new gametype
PostPosted: Mon Feb 28, 2011 4:24 pm 
Offline
Command Sergeant Major
User avatar

Joined: Thu Jan 20, 2011 3:49 pm
Posts: 262
Location: Somewhere, but most likely where i am
Projects :: Alzoc 3
Games I'm Playing :: Battlefront 2 MW2
Xfire: xundyingxace
xbox live: xundyingxace
could you connect team 3 losing directly to team 1 losing with a code and the message, like directions in the start like campaign, and so on till one teams ally is out? if so then how, wanna add somethin like this :P


Top
 Profile  
 
 Post subject: Re: Scripting new gametype
PostPosted: Mon Feb 28, 2011 5:04 pm 
Offline
Jedi Admin
Jedi Admin
User avatar

Joined: Wed Sep 07, 2005 11:42 pm
Posts: 10191
Location: Indiana
So I'm a bit confused. Let me see if I get this right (which I probably won't)

**Teams 1 and 2 are player teams, but aren't "enemies" per say, though they are competing for points
**Teams 3 and 4 are basically target practice. Both teams try to either kill them off or hit a point limit.

If that's it in a nutshell it's not hard to code, and you can set it up so that the reinforcement count is is a team deathmatch scoreboard.


Top
 Profile  
 
 Post subject: Re: Scripting new gametype
PostPosted: Wed Mar 02, 2011 10:55 am 
Offline
Command Sergeant Major
User avatar

Joined: Thu Jan 20, 2011 3:49 pm
Posts: 262
Location: Somewhere, but most likely where i am
Projects :: Alzoc 3
Games I'm Playing :: Battlefront 2 MW2
Xfire: xundyingxace
xbox live: xundyingxace
here is the script so far
Hidden/Spoiler:
Code:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")
ScriptCB_DoFile("ObjectiveTDM")
    ScriptCB_SetGameRules("campaign")

   
   --  REP Attacking (attacker is always #1)
    REP = 1;
    CIS = 2;
    --  These variables do not change
    ATT = REP;
    DEF = CIS;
    Arc = 3;
    Dro = 4;
    SBD = 5;

function ScriptPostLoad()
SetAIDifficulty(0, 2, "hard")
        AllowAISpawn(ATT, false)
        AllowAISpawn(DEF, false)
        AllowAISpawn(3, false)
        AllowAISpawn(4, false)
        EnableSPScriptedHeroes()
        ScriptCB_SetGameRules("campaign")

      onfirstspawn = OnCharacterSpawn(
           function(character)
               if character == 0 then
                  ShowPopup("level.geo1.hints.hints")
                   ReleaseCharacterSpawn(onfirstspawn)
                   onfirstspawn = nil
                   BeginObjectivesTimer()
                   ScriptCB_EnableCommandPostVO(0)
 
        end
    end)
--objective Protect your allies CP


    Objective1CP = CommandPost:New{name = "ADDCP_HERE"}
   Objective1 = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.ETR.campaign.rep.1", popupText = "level.ETR.campaign.rep.1_popup",  AIGoalWeight = 0}
   Objective1:AddCommandPost(Objective1CP)
   
   Objective1:AddHint("level.geo1.hints.capture_cp")
   
   Objective1.OnStart = function(self)
Matchtimer= CreateTimer("Matchtimer")
    SetTimerValue(Matchtimer, (420))
StarTimer(Matchtimer)
      OnTimerElapse(AICanCaptureCP("DRO_CP", "SBD_CP", "CIS_CP"), AddAIGoal(ATT, "Defend", 50000, "DRO_CP", SBD_CP", CIS_CP"), AddAIGoal(3, "Defend", 50000, "DRO_CP", "SBD_CP", "CIS_CP"),
      DeleteAIGoal(ATT, "Defend", 50000, "ADDCP_HERE")
      DeleteAIGoal(DEF, "Defend", 50000, "cp2_c")
      DeleteAIGoal(ATT, "Deathmatch", 10)
      function(timer)

DestroyTimer(timer)
end,
Matchtimer
)
      AICanCaptureCP("ADDCP_HERE", ATT, false)
        MapAddEntityMarker("ADDCP_HERE", "hud_objective_icon_circle", 3.0, ATT, "YELLOW", true, true, true)
      AICanCaptureCP("ADDCP_HERE", DEF, true)
      att_obj1_aigoal = AddAIGoal(ATT, "Defend", 50000, "ADDCP_HERE")
      def_obj1_aigoal = AddAIGoal(DEF, "Defend", 50000, "ADDCP_HERE")
      def_obj1_aigoal = AddAIGoal(3, "Defend", 50000, "ADDCP_HERE")
      def_obj1_aigoal = AddAIGoal(4, "Defend", 50000, "ADDCP_HERE")
      def_obj1_aigoal = AddAIGoal(5, "Defend", 50000, "ADDCP_HERE")
      att_obj1_aigoal2 = AddAIGoal(ATT, "Deathmatch", 10)
                AllowAISpawn(ATT, true)
                AllowAISpawn(DEF, true) 

would this work for the on timer elapse stuff with multiple command posts, and is this all set up right so far? also is there a way that i can have the mission be victory after the timer elapses and the Droids main cp not their ally's cps is capture i know the code would be missionvictoy, but can someone look over this for me? Thanks! :D :D :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


StarWars Gametoast Forum Style by Penguin, © 2011