UE3 - UDK problem with a light-launcher

  • 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.

reverendKmeat

New Member
May 12, 2011
1
0
0
quick introduction: I am a game art student, i'm mostly a painter. My experience with scripting to date is that i know some web coding (which doesn't count) i had an 11 week MEL class over the winter quarter. Having been thrown into an unreal scripting class i'm a little over my head, but i enjoy it a lot. that having been said-

I'm putting together a UDK sidescroller where the character will fire rockets that create lights. When the character is outside of the light their health will steadily decrease.

i've fiddled with the rocket class projectile lights, set up the DOT function in the player class, created a volume class that toggles the player as "lit" or "unlit" to deal damage to them when unlit. cameras work, controlls work, everythings dandy.

PROBLEM:I cannot figure out how to spawn my light-check volume when the rocket explodes. I tried adding to the HitWall function, but i can't seem to get the parameters right, it just keeps spitting errors at me on parameter 1. I thought i had it using Event HitWall, but despite no errors all i ended up doing was breaking the event.

If anybody could point me in the right direction i'd appreciate it. I doubt i'm getting the parameters for the Spawn function right either, but i haven't really gotten that far.

here's the current attempt that isn't working:


Code:
Simulated function KDHitWall(Object.Vector HitNormal, Actor Wall, PrimitiveComponent WallComp)
{
	super.Hitwall(Object.Vector HitNormal, Actor Wall, PrimitiveComponent WallComp)
	SurfaceNormal=Hitnormal;
	SpawnVolume();
}
simulated function SpawnVolume()
{
  Spawn(class'KDLightCheckVolume',self,,Location,,);

}

i had tried just putting my spawnVolume function in Hitwall but got an error that said i couldn't redefine it. This is in my rocket class.
 
Last edited:

DannyMeister

UT3 Jailbreak Coder
Dec 11, 2002
1,275
1
38
41
Bolivar, Missouri
I looked at the function signature of HitWall on the unreal wiki and I do see Object.Vector listed as the first parameter data type, but I'd try removing the "Object." portion from it and see if that gets you around your compilation error.

The next thing you'll probably run into is that nothing is going to call your KDHitWall unless you have some code not posted that does that. If you are wanting to receive the native event then you'll need to name it HitWall, not KDHitWall.

You also may need to change some of the default properties of your custom volume class to make it spawnable. Such as setting bStatic=false.