Allan's Coding Problem List

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

Moderator: Forum Guards

Allan's Coding Problem List

Postby Allan » Wed Mar 15, 06 6:09 pm

To save time on mine, and everyone else's parts, I decided to start a thread for my coding problems, as i seem to have so many XD

So, to put a start to my list:

1: UT style "Player leads the match by -- points" texture

If you ever played the Morpheus level in UT-GOTY edition, you may remember the "Player leads the match by -- points" textures. I thought these were really cool, and wanted to use them for my SuperModv1 (Probably going to have to remove the V anything eventually, with all the stuff in it XD) pack. I copied the codes from UT for them, and changed them slightly, so it was more specific about what it was to look for (DeusExPlayer instead of PlayerPawn). However, it has been giving me accessed nones ever since i started with it. Even before modifying the PlayerPawn bits to DeusExPlayer.

Fixed by [A]lex, it was just a problem with the texture i was using :D

2: MS3d Animating

Not really a coding issue, but still something that bothers me. I've been making a few meshes, and was wondering how i animate them so they work in DX? Any help here?
Last edited by Allan on Thu Mar 16, 06 2:24 pm, edited 1 time in total.
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Alex » Wed Mar 15, 06 6:18 pm

Use Scripted.utx, use the exact same script as in UT. Just do the same as Morpheus, and it works.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Allan » Wed Mar 15, 06 6:25 pm

Weird, but ok, i'll try it :) Wonder why it needs Scripted.utx...
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Alex » Wed Mar 15, 06 6:32 pm

Because that's the texture it will replicate the text on... :roll:
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Allan » Wed Mar 15, 06 6:39 pm

Lol, silly me :P .Ah well, i got it working now, just made a scripted texture on something i knocked together on paint, and added it to SuperModTex. Screenshots in a mo :D

Thanks for the help Alex, this'll really help in my new map/s :D
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Allan » Thu Mar 16, 06 2:30 pm

Updated!!!
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Dae » Thu Mar 16, 06 7:56 pm

A topic with all your questions is a good idea but please post your questions as separate messages, instead of updating the first message. That's more comfortable for us.

And personally I don't understand what's the essence of the problem? As far as I remember you can make animations in Milkshape, as usually after that you will have to use Tack's tool (or someone's plugin) to convert them to Deus Ex format.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Allan » Mon Mar 27, 06 7:30 pm

Ok, new issue.

Not a problem as such, but could someone go over these mutator codes to check if they would work in game with the proper setup?

Code: Select all
//=============================================================================
// AllBomber. Sets LAM's on everyone but you!
//=============================================================================
class AllBomber expands Mutator config (Mutators);

simulated function PostBeginPlay()
{
   Level.Game.BaseMutator.AddMutator(Self);
}

function Mutate (String S, PlayerPawn Player)
{
Local DeusExPlayer DX;
Local LAM B;

If (DX.bAdmin==True)
 {
   if (S ~= "blowall")
   {
      foreach AllActors(Class'DeusExPlayer',DX)
     {
        if (DX != None && DX != Self)
        {
        B.spawn(class'DeusEx.LAM');
        B.SetBase(DX);
        B.bArmed=True;
        B.bProximityTriggered=True;
        B.bHighlight=True;
        B.bHidden=True;
        B.FuseLength=10.0;
        B.BlastRadius=32;
        B.FragmentClass=None;
        B.Damage=100000;
        B.Speed=0;
        B.Velocity.X=DX.Velocity.X;//Dirty hack to keep the projectile in place,
        B.Velocity.Y=DX.Velocity.Y;//as Const variables such as Physics can't be
        B.Velocity.Z=DX.Velocity.Z;//changed easily via coding.
        }   
     }
   }
 }
 If (DXP.bAdmin!=True)
 {
 return;
 }
}


Code: Select all
//=============================================================================
// AllanHelpMutator. -Provides help on mutators and weapons.
//=============================================================================
class AllanHelpMutator expands Mutator config(Mutators);

simulated function PostBeginPlay()
{
   Level.Game.BaseMutator.AddMutator(Self);
}
 
function Mutate (String S, PlayerPawn Player)
{
local DeusExPlayer DX;

   if (S ~= "Help")
   {
        if (DX != None)
        {
           DX.ClientMessage("|P2Mutator Help: |P3For access to some of the functions, you need to be an admin. These include the 'Log All players in as admin' and 'All Players explode' mutators. However, the 'Suicide Bomber' and 'Bubble Shield' are free for anyone to use.");
           DX.ClientMessage("|P2Other Help: |P3To use the alternate fire modes for weapons, use # to switch their modes. If this doesn't work, they only have 1 mode.");
        }     
   }
}




Code: Select all
//=============================================================================
// AllAdmins.
//=============================================================================
class AllAdmins expands Mutator;

simulated function PostBeginPlay()
{
   Level.Game.BaseMutator.AddMutator(Self);
}

function Mutate (String S, PlayerPawn Player)
{
Local DeusExPlayer DX;

If (DX.bAdmin==True)
 {
   if (S ~= "alllogin")
   {
      foreach AllActors(Class'DeusExPlayer',DX)
     {
        if (DX != None && DX != Self)
        {
      DX.bAdmin=True;
      DX.ClientMessage("|P3You have been logged into administration by |P2Allan's |P3Admin mutator");
        }   
     }
   }
   if (S ~= "alllogout")
   {
      foreach AllActors(Class'DeusExPlayer',DX)
     {
        if (DX != None && DX != Self)
        {
      DX.bAdmin=False;
      DX.ClientMessage("|P3You have been logged out of administration by |P2Allan's |P3Admin mutator");
        }   
     }
   }
 }
 If (DX.bAdmin!=True)
 {
 return;
 }
}


Thanks to anyone who helps with this :D
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Alex » Mon Mar 27, 06 7:41 pm

Where does it define who 'DX' is.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Allan » Mon Mar 27, 06 7:50 pm

At the start of Mutate function, it has "Local DeusExPlayer DX;" on each of them. Didn't see the point of making it a Var, as it's only used in one function. Or do you mean who, as in which player?
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Alex » Mon Mar 27, 06 8:20 pm

As in which player.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Allan » Mon Mar 27, 06 8:30 pm

Isn't it the "if (DX!=None && DX!=Self)"<Should make all players affected but the person who triggered the mutator> , or does the Self bit in that refer to the actual mutator, instead of the player using it...?
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Alex » Tue Mar 28, 06 7:25 am

The player who calls the function is in Mutate ()
It is Player, not DX
You do have to use DX for the foreach, but if(DX.bAdmin==True) is impossible.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Allan » Tue Mar 28, 06 3:57 pm

Ah, so the ones with the If(DX.bAdmin==True) don't work...

So how would i go about fixing these to make them only work for admins?
As i don't want just anyone coming into my server and blowing everybody up with invisible LAM's attached to each player :P, that would be anarchy!
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Alex » Tue Mar 28, 06 7:11 pm

Just replace
If (DX.bAdmin==True)
{
With
If (Player.bAdmin==True)
{
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Allan » Tue Mar 28, 06 7:34 pm

Ok, i'll give it a shot :)
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 39 guests