1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Changing properties...

Discussion in 'Ask a Coder' started by Eyegore, Feb 3, 2005.

  1. Eyegore

    Eyegore =================

    Joined:
    Sep 4, 2001
    Messages:
    293
    Likes Received:
    0
    Hi guys,

    Sorry I havn't been around in a while. The last 4 months were loaded with outside world crap. Lots of projects put on hold, etc...

    But now, I've found myself again and I'm trying to get some projects finished and blah, blah... you know the story.

    Anyway, I DL'ed the ECE pack and got to messin around with the SPMA. I like the concept of the MIRV, but for crying out loud, it only releases 5 warheads!! I have been able to kill only 1 bot with the damn thing!!

    So i'm trying to make a quickie mutator to increase the payload, but I'm having trouble implementing. At first, I tried to simply create an entire new class (cut/paste of course), but for some reason, the camera won't follow the shell. Then I got the brilliant idea of simply replacing the ONSMortarShell class with my beefed up version, but for some reason (actually, the reason is I don't understand exactly how to do it) I can't get the darn thing to compile. Here is the code, I think you'll get my idea after looking at it

    Code:
    function PostBeginPlay()
    {
    	local ONSArtillery artillery;
    	
    	MyProjectile = class<Projectile>( DynamicLoadObject("DNMutSPMA.DNONSMortalShell",class'class') );
    	
    	if(MyProjectile != None)
    	{
    		foreach AllActors( class 'ONSArtillery', artillery)
    		{
    			artillery.DriverWeapons.ProjectileClass = MyProjectile;
    		}
    	}
    
    	super.PostBeginPlay();
    }
    
    Please keep in mind that I'm not really a well versed UScripter (though I've decided to work on that)

    I'm simply trying to change the projectile class for the ONSArtilleryCannon, but I can't seem to access that property.

    Any tips?

    Thanks!
     
  2. Eyegore

    Eyegore =================

    Joined:
    Sep 4, 2001
    Messages:
    293
    Likes Received:
    0
    Hello again,

    I got it worked out - I was trying to do too much.

    I ended up simply subclassing only as many classes as it took to modify the the Timer() function in the ONSMortarShell class, then just overrode the function, deleting everything else.

    A slight frame rate killer, but it's truly terrifying when you see 50 warheads raining down on you!! It's also great fun to see the vehicles blown 40-50 feet up in the air when you nail 'em!!

    Thanks and hope to see you around more often!
     

Share This Page