Results 1 to 11 of 11

Hybrid View

  1. #1

    Default 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. #2
    Boomshot
    Join Date
    Oct 2007
    Posts
    2,300
    Gamer IDs

    Gamertag: Fr0z3nB0nes

    Default

    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.

  3. #3

    Default

    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

  4. #4
    Boomshot
    Join Date
    Oct 2007
    Posts
    2,300
    Gamer IDs

    Gamertag: Fr0z3nB0nes

    Default

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

    If so it must be either War or Ctf etc

  5. #5

    Default

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

  6. #6
    Banned
    Join Date
    Dec 2007
    Location
    under bridge
    Posts
    140
    Gamer IDs

    Gamertag: homee

    Default

    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 .
    Last edited by microbious; 05-18-2008 at 11:56 PM.

  7. #7
    Boomshot
    Join Date
    Oct 2007
    Posts
    2,300
    Gamer IDs

    Gamertag: Fr0z3nB0nes

    Default

    Thats what i was trying to say...

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

  8. #8
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    33

    Default

    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

  9. #9
    MSgt. Shooter Person
    Join Date
    Dec 2007
    Posts
    72

    Default

    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.

  10. #10

    Default

    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"
    }

  11. #11

    Default

    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.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.