Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Help with Assault

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with Assault

    Hey everyone i have a quick question. I have created an Assault type game and all the scripts work. The problem is I cant figure out how to bring the weapons(the actual player.....it only shows the crosshares when i choose play from here) into play for the player. Can someone please help me? Thanks.

  • #2
    Your map needs a prefix, whats its name.

    If it uses warfare nodes etc t needs to be WAR-Mapname or if its deathmatch or tdm then DM-Mapname.

    Once thats done it will work.

    Even if it is a custom gametype it needs to have one of those prefixes, and in your gametype code you need to specify which prefix to use.

    Comment


    • #3
      yea when i created assault i made the prefix AS in the game script and i put AS- in front of the name of the map when saving it and it still didnt work. It just shows the crosshare only so the character is in the game just not the guns

      Comment


      • #4
        Have you used any onslaught nodes or ctf flags etc in your maps though?

        If so it must be either War or Ctf etc

        Comment


        • #5
          nope no nodes in the mode....im just using triggers on static meshes as assault points

          Comment


          • #6
            Its a custom game type, changing the prefix wont do any good unless you have a prefix that unreal recognize such as CTF VCTF WAR DM TDM what ever, AS just wont work.
            does that help ?
            Ask EPIC to implement this into the next patch which never comes out i suppose.

            Oh boy, i cant wait until epic give up on UT3 and make UT4 just like back with ut2004 into ut2004

            And oh boy, wasn't it the best thing they ever did .

            Comment


            • #7
              Thats what i was trying to say...

              ...i did it very badly though...

              Comment


              • #8
                I hear ya microbious and maybe they will give us decent content like assault. IF not indiscreation keep up the good work I am a die hard Assault player and would like to see this

                Comment


                • #9
                  I'm fairly sure you can add new game type prefixes. It involves some defaultproperties in your game type class and maybe an INI setting or two. Look through the existing game types for examples, and search in the INI file for the existing prefixes; I think I saw something in there. Also, make sure your class derives from a game type class with "UT" as the first two letters of the class name. If you try to derive from one of the more basic classes, you're into "Total Conversion" territory, and I'm not sure you want to go there just yet.

                  Comment


                  • #10
                    imma post the 3 scripts i created....maybe someone is seeing something im not

                    Code:
                    class UTAssaultGame extends UTTeamGame;
                    
                    var UTAssaultMapInfo MapInfo;
                    
                    //*******  FUNCTION FOR PRE BEGIN PLAY ******* 
                    function PreBeginPlay()
                    {
                    	MapInfo = UTAssaultMapInfo(WorldInfo.GetMapInfo());
                    	if (MapInfo != None)
                    	{
                    		TimeLimit = MapInfo.TimeLimit;
                    	}
                    	else 
                    	{
                    		TimeLimit = 2;
                    	}
                    	Super.PreBeginPlay();
                    }
                    //*******  END FUNCTION FOR PRE BEGIN PLAY ******* 
                    
                    //*******  FUNCTION FOR POST BEGIN PLAY ******* 
                    function PostBeginPlay()
                    {
                    	Super.PostBeginPlay();
                    	MapInfo.Initialize();
                    }
                    //*******  END FUNCTION FOR POST BEGIN PLAY ******* 
                    
                    //*******  FUNCTION FOR CHECK SCORE ******* 
                    function bool CheckScore(PlayerReplicationInfo Scorer)
                    {
                    	if (MapInfo.GameOver)
                    		{
                    			GameReplicationInfo.Teams[0].Score = 1;
                    			GameReplicationInfo.Teams[1].Score = 0;
                    			EndGame(Scorer, "triggered");
                    			return true;
                    		}
                    		
                    	GameReplicationInfo.Teams[0].Score = 0;
                    	GameReplicationInfo.Teams[1].Score = MapInfo.NumObjectivesLeft();
                    	
                    	return false;
                    }
                    //*******   END FUNCTION FOR CHECK SCORE ******* 
                    
                    //*******  FUNCTION FOR SCORE KILL ******* 
                    function ScoreKill(Controller Killer, Controller Other)
                    {
                    	Super(GameInfo).ScoreKill(Killer, Other);
                    }
                    //******* END FUNCTION FOR SCORE KILL ******* 
                    
                    //*******  default PROPERTIES ******* 
                    
                    defaultproperties
                    {
                    	Acronym="AS"
                    	MapPrefixes[0]="AS"
                    	Description="Defend or defeat a number of objectives."
                    	EndOfMatchRulesTemplateStr_Scoring="Defend or defeat a number of objectives."
                    	EndOfMatchRulesTemplateStr_Time="Defend or defeat a number of objectives."
                    	GameName="Assault"
                    }
                    Code:
                    class UTAssaultMapInfo extends UTMapInfo;
                    
                    struct AssaultObjective
                    {
                    	var() String Name;
                    	var() int Points;
                    	var() String AttackNext;
                    	var() String DefendNext;
                    	var bool Completed;
                    };
                    
                    var() array<AssaultObjective> AssaultObjectives;
                    var() int TimeLimit;
                    var bool GameOver;
                    
                    function Initialize()
                    {
                    	local int i;
                    	for(i=0; i<AssaultObjectives.Length; i++)
                    	{
                    		AssaultObjectives[i].Completed = false;
                    	}
                    	GameOver = false;
                    }
                    
                    function CompleteObjective(String ObjName, PlayerReplicationInfo PRI)
                    {
                    	local int ObjIndex;
                    	ObjIndex = AssaultObjectives.Find('Name', ObjName);
                    
                    	if (ObjIndex != -1)
                    	{
                    		if (!AssaultObjectives[ObjIndex].Completed)
                    		{
                    			AssaultObjectives[ObjIndex].Completed = true;
                    			//SendMessage(AssaultObjectives[ObjIndex]);
                    		}
                    		
                    		if (PRI != None)
                    		{
                    			PRI.Score += AssaultObjectives[ObjIndex].Points;
                    		}
                    	}
                    
                    	if (ObjName == "Win")
                    	{
                    		GameOver = true;
                    	}
                    
                    	WorldInfo(Outer).Game.CheckScore(PRI);
                    }
                    
                    
                    function SendMessage(AssaultObjective Obj, PlayerReplicationInfo PRI)
                    {
                    	local UTPlayerController PC;
                    	foreach WorldInfo(Outer).AllControllers(class'UTPlayerController', PC)
                    	{
                    		if (PC.PlayerReplicationInfo.Team.TeamIndex == 1)
                    		{
                    			PC.ClientMessage(Obj.DefendNext);
                    		}
                    		else
                    		{
                    			PC.ClientMessage(Obj.AttackNext);
                    		}
                    	}
                    }
                    
                    function int NumObjectivesLeft()
                    {
                        local int i;
                        local int Num;
                    
                        Num = 0;
                        for (i=0; i<AssaultObjectives.Length; i++)
                        {
                            if (!AssaultObjectives[i].Completed)
                            {
                                Num++;
                            }
                        }
                    
                        return Num;
                    }
                    defaultproperties 
                    {
                    	TimeLimit=2
                    }
                    Code:
                    class UTAssaultSeqAct extends SequenceAction;
                    
                    var() String CompleteObjective;
                    
                    function Activated()
                    {
                    	local UTAssaultMapInfo MapInfo;
                    	local SeqVar_Object ObjVar;
                    	local Pawn P;
                    	local Controller C;
                    	local PlayerReplicationInfo PRI;
                    
                    	foreach LinkedVariables(class'SeqVar_Object', ObjVar, "Target")
                    	{
                    		C = Controller(ObjVar.GetObjectValue());
                    		
                    		if (C == None)
                    		{
                    			P = Pawn(ObjVar.GetObjectValue());
                    			if (P != None)
                    			{
                    				C = P.Controller;
                    			}
                    		}
                    		if (C != None)
                    		{
                    			PRI = C.PlayerReplicationInfo;
                    			if (PRI != None)
                    			{
                    				break;
                    			}
                    		}
                    	}
                    
                    	MapInfo = UTAssaultMapInfo(GetWorldInfo().GetMapInfo());
                    	if (MapInfo != None)
                    	{
                    		MapInfo.CompleteObjective(CompleteObjective, PRI);
                    	}
                    
                    	Super.Activated();
                    }
                    
                    defaultproperties
                    {
                    	ObjName="Complete Assault Objective"
                    }

                    Comment


                    • #11
                      Indiscretion. I am working on a UT3 project in college with a group. I wanted to thank you so much for posting this code. It has provided the basis we needed to get over a hump getting the mapinfo to load and our end game parameters to be used. You will definitely be credited for being a HUMONGOUS help to our efforts. Thank you again.

                      Comment

                      Working...
                      X