Page 1 of 1

Help with Allan's Zombie Mod,

PostPosted: Mon Jan 09, 12 8:12 pm
by bambi
Where is "Owner"?
Code: Select all

//=============================================================================
// FireGrenade.
//=============================================================================
class FireGrenade expands HandGrenade;

auto simulated state Flying
{
   simulated function Explode(vector HitLocation, vector HitNormal)
   {
      local ShockRing ring;
      local DeusExPlayer player,jd;
      local float dist;
      local FlameSpawn S;

      player = DeusExPlayer(Owner);

      foreach RadiusActors(class'DeusExPlayer',jd,512,location)
      {
         dist = Abs(VSize(jd.Location - Location));
         if (dist ~= 0)
            dist = 10.0;
         else
            dist = 2.0 * FClamp(blastRadius/dist, 0.0, 4.0);
         jd.ClientFlash(1.0, vect(100,50,0));
         jd.TakeDamage(35,DeusExPlayer(Owner),Location,vect(0,0,0),'Flamed');
         dist=0.0;
      }

      S=Spawn(class'FlameSpawn',,,Location+vect(0,0,96));
      S.SetOwner(DeusExPlayer(Owner));
      S.DrawScale=2;

      PlayImpactSound();

      if ( AISoundLevel > 0.0 )
         AISendEvent('LoudNoise', EAITYPE_Audio, 2.0, AISoundLevel*blastRadius*16);
      Destroy();
   }
}

defaultproperties
{
    MultiSkins=Texture'Skins.IncGrenade'
}


How can you use Deusexplayer(Owner);??? I don't see Owner anywhere?

PostPosted: Mon Jan 09, 12 9:03 pm
by Poor
It inherits Owner from Engine.Actor.

PostPosted: Mon Jan 09, 12 9:18 pm
by bambi
Thanks, Ok what is this for?

Code: Select all
class ZombieController expands ResEvilBaseActor;

Function PreBeginPlay()
{
   SetTimer(0.2,True);
}

PostPosted: Mon Jan 09, 12 9:31 pm
by Alex
It sets that the function Timer() will be called every 0.2 seconds (0.2, plus True for repeat, if it was SetTimer(0.2, False); it would only run Timer() once after 0.2 seconds).

PostPosted: Mon Jan 09, 12 9:44 pm
by Poor
Export all the classes in the packages Core, Engine, Extension, and DeusEx with WOTGreal so you can see how everything works. For example, if you want to know about timer, you could search for "SetTimer" in Actor.uc and you'll find:

Code: Select all
//=============================================================================
// Timing.

// Causes Timer() events every NewTimerRate seconds.
native(280) final function SetTimer( float NewTimerRate, bool bLoop );

PostPosted: Mon Jan 09, 12 10:08 pm
by Dae
Alternatively search on BeyondUnreal Wiki.

What Poor suggested is also a very good idea.

PostPosted: Mon Jan 09, 12 10:56 pm
by bambi
Ok, thanks' for the excellent help. I have a couple of interesting ideas I'm chewing on ie. I found a couple of mods that I can borrow stuff from including some pretty cool looking meshes

PostPosted: Tue Jan 10, 12 1:09 am
by bambi
Code: Select all
   // Don't do it in multiplayer.
   if (Level.NetMode == NM_Standalone)
      return;

   Game = DeusExMPGame(Level.Game);
   if (Game == None)
   {
      return;
   }


What are all the different types of netmodes and what is their meaning?

PostPosted: Tue Jan 10, 12 2:15 am
by Poor
Like I said in my last post, you can find a lot by looking at the classes. Level is a variable of type LevelInfo so if you look in the LevelInfo class you will find this.

Code: Select all
var enum ENetMode
{
   NM_Standalone,        // Standalone game.
   NM_DedicatedServer,   // Dedicated server, no local client.
   NM_ListenServer,      // Listen server.
   NM_Client             // Client only, no local server.
} NetMode;


Standalone is single player. You'll often see code checking if the level is in single player mode. The other 3 are for MP. Dedicated server is pretty obvious. Listen Server is a non-dedicated server, and I'm guessing client is the value clients have for Level.

PostPosted: Tue Jan 10, 12 2:28 pm
by bambi
btw poor, how can I export all the classes using UTPT? I like the format for UTPT but its annoying to have to export each class one at a time.

ALSO! NOTEPAD++ I LOVE IT! I can search all the DX files engine, core, deusex for things I'm like wtf about.

PostPosted: Wed Jan 11, 12 12:19 am
by ~DJ~
Just export all from Editor? then open up files from NOTEPAD++?

PostPosted: Wed Jan 11, 12 12:38 am
by ~ô¿ô~Nobody~
When you want to export the sources from packages like Engine or DeusEx, I suggest WotGreal exporter.
It right exports the source as .uc files and creates a corresponding package folder below the DeusEx folder with those files. You can export multiple by selecting the check boxes for all.