Domination`

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Domination`

Postby Alex » Thu Jun 29, 06 7:42 pm

Sorry for the inactiveness :)
Ok... I made this a while ago, some of you might have seen it ;)
Code: Select all
//=============================================================================
// ControlPoint. Made by Alex, visit http://www.dxalpha.com/
//=============================================================================
class ControlPoint extends DeusExDecoration;

var int PlayerTeam;
var Pawn Controller;
var bool bFirst;
// Make it var(), so it's editable in SDK
var() string ControlPointName;

/*
Texture's used:
Neutral:
FireTexture'Effects.UserInterface.WhiteStatic'
NSF:
FireTexture'Effects.liquid.Virus_SFX'
Unatco:
FireTexture'Effects.Fire.Wepn_Prifle_SFX'
*/

function PostBeginPlay()
{
      SetTimer(30.0, true);
}

function Frob(Actor Frobber, Inventory frobWith)
{
   if(DeusExPlayer(Frobber) != None)
   {
      if(DeusExPlayer(Controller) == None)
      {
         Controller = DeusExPlayer(Frobber);
         PlayerTeam = DeusExPlayer(Frobber).PlayerReplicationInfo.Team;
         BroadCastMessage("ControlPoint"@ControlPointName@"has been taken over by"@DeusExPlayer(Frobber).PlayerReplicationInfo.PlayerName);
         if(DeusExPlayer(Frobber).PlayerReplicationInfo.Team == 0)
         {
            MultiSkins[1]=FireTexture'Effects.Fire.Wepn_Prifle_SFX';
            LightSaturation=0;
            LightHue=80;
         } else {
            MultiSkins[1]=FireTexture'Effects.liquid.Virus_SFX';
            LightSaturation=0;
            LightHue=0;
         }
      } else {
         if(DeusExPlayer(Controller).PlayerReplicationInfo.Team == DeusExPlayer(Frobber).PlayerReplicationInfo.Team)
         {
            DeusExPlayer(Frobber).ClientMessage("|p2This control point already belongs to your team.");
         } else {
            Controller = DeusExPlayer(Frobber);
            PlayerTeam = DeusExPlayer(Frobber).PlayerReplicationInfo.Team;
            BroadCastMessage("ControlPoint"@ControlPointName@"has been taken over by"@DeusExPlayer(Frobber).PlayerReplicationInfo.PlayerName);
            if(DeusExPlayer(Frobber).PlayerReplicationInfo.Team == 0)
            {
               MultiSkins[1]=FireTexture'Effects.Fire.Wepn_Prifle_SFX';
               LightSaturation=0;
               LightHue=80;
            } else {
               MultiSkins[1]=FireTexture'Effects.liquid.Virus_SFX';
               LightSaturation=0;
               LightHue=0;
            }
         }
      }
   }
}

function Timer()
{
   if(bFirst != True)
   {
      bFirst = True;
      if(DeusExPlayer(Controller) != None && DeusExPlayer(Controller).PlayerReplicationInfo.Team == PlayerTeam)
      {
      } else {
         Controller=None;
         MultiSkins[1]=FireTexture'Effects.UserInterface.WhiteStatic';
         LightHue=0;
         LightSaturation=255;
      }
   } else {
      if(DeusExPlayer(Controller) != None && DeusExPlayer(Controller).PlayerReplicationInfo.Team == PlayerTeam)
      {
         Controller.PlayerReplicationInfo.Score += 1;
      } else {
         Controller=None;
         MultiSkins[1]=FireTexture'Effects.UserInterface.WhiteStatic';
         LightHue=0;
         LightSaturation=255;
      }
      bFirst = False;
   }
}

defaultproperties
{
     ControlPointName="Control Point"
     bInvincible=True
     bPushable=False
     bCanBeBase=True
     bFlammable=False
     ItemName="Control Point"
     bBlockSight=True
     Mesh=LodMesh'DeusExDeco.BarrelAmbrosia'
     MultiSkins(1)=FireTexture'Effects.UserInterface.WhiteStatic'
     CollisionRadius=16.000000
     CollisionHeight=28.770000
     LightType=LT_Steady
     LightEffect=LE_WateryShimmer
     LightBrightness=96
     LightSaturation=255
     LightHue=0
     LightRadius=4
     Mass=80.000000
     Buoyancy=12.000000
}

Just look at it, and ask questions if desired. Do not be ashamed if you don't get something!
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby MainMan » Thu Jun 29, 06 7:48 pm

So the only time a player can get a score point, is 30 seconds after the game starts? :?
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby Alex » Thu Jun 29, 06 7:49 pm

Code: Select all
      SetTimer(30.0, true);

It has true as second variable. It loops ;)
And actually... it gives points every 60 seconds. Just look in the timer() ;)
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby MainMan » Thu Jun 29, 06 8:11 pm

Ahh yeah, I didn't notice that.

This is ugly though:
Code: Select all
      if(DeusExPlayer(Controller) != None && DeusExPlayer(Controller).PlayerReplicationInfo.Team == PlayerTeam)
      {
      }




You should just use:
Code: Select all
      if( (DeusExPlayer(Controller) == None) || DeusExPlayer(Controller).PlayerReplicationInfo.Team != PlayerTeam) )
      {
             <Set neutral skin here>
      }
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby Allan » Thu Jun 29, 06 8:18 pm

It's really good, but you could save the trouble of having to actually click it by making it into function Touch (Or whatever the old UT way of doing it was) instead of function Frob. Some people are lazy bastards after all XD
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby DarkKnight » Thu Jun 29, 06 9:19 pm

Allan wrote:It's really good, but you could save the trouble of having to actually click it by making it into function Touch (Or whatever the old UT way of doing it was) instead of function Frob. Some people are lazy bastards after all XD


Touch / Bump.
Image
I'm a lover, that's why I do this posting.
I don't need the forum,
I do it to save you ignorant bastards from your self.
User avatar
DarkKnight
Forum Super Hero
 
Posts: 4064
Joined: Wed Dec 10, 03 10:01 am
Location: Under the bridge.

Postby Alex » Thu Jun 29, 06 9:39 pm

~MainMan~ wrote:Ahh yeah, I didn't notice that.

This is ugly though:
Code: Select all
      if(DeusExPlayer(Controller) != None && DeusExPlayer(Controller).PlayerReplicationInfo.Team == PlayerTeam)
      {
      }




You should just use:
Code: Select all
      if( (DeusExPlayer(Controller) == None) || DeusExPlayer(Controller).PlayerReplicationInfo.Team != PlayerTeam) )
      {
             <Set neutral skin here>
      }

Yea I know. I made that bit on the last end, and I was kinda lazy :roll:
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 44 guests