UE1 - UT Accessed none online in projectile

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

Rajada

Member
Jan 21, 2008
213
0
16
rajada.tumblr.com
I thought this would work fine, it looks fine to me, but online this code returns an accessed none in this function and shows all four explosions rather than just the random one chosen. It seems that it explodes multiple times (seems to be when it hits a wall, not an actor) because I can hear the explode sound effect multiple times.

Any ideas? Because I don't see anything wrong with this code at all.

Oh, and timescale is a float variable I defined in the beginning of the script, it goes up as the projectile's time in the air goes up.

Code:
simulated function Explode(vector HitLocation, vector HitNormal)
	{

	local FireworkExp1 s;
	local FireworkExp2 t;
	local FireworkExp3 u;
	local FireworkExp4 v;
	local float Rand;

		BlowUp(HitLocation);
		Rand = FRand();
	
		if((Rand>=0)&&(Rand<0.25))
		{
		s = spawn(class'RajMutators2.FireWorkExp1',,,HitLocation + HitNormal*16 );	
		s.DrawScale+=TimeScale;
		}
		else if((Rand>=0.25)&&(Rand<0.5))
		{
		t = spawn(class'RajMutators2.FireWorkExp2',,,HitLocation + HitNormal*16 );	
		t.DrawScale+=TimeScale;
		}
		else if((Rand>=0.5)&&(Rand<0.75))
		{
		u = spawn(class'RajMutators2.FireWorkExp3',,,HitLocation + HitNormal*16 );	
		u.DrawScale+=TimeScale;
		}
		else if((Rand>=0.75)&&(Rand<=1.0))
		{
		v = spawn(class'RajMutators2.FireWorkExp4',,,HitLocation + HitNormal*16 );	
		v.DrawScale+=TimeScale;
		}
		else
		{
		v = spawn(class'RajMutators2.FireWorkExp4',,,HitLocation + HitNormal*16 );	
		v.DrawScale+=TimeScale;
		}
		PlaySound(MiscSound, SLOT_None, 2.3);
		Destroy();
	}
 
Last edited:

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Is that class bNetTemporary? If not, it cannot be destroyed clientsidely and if the velocity or physics mode isn't reset, it will collide with the wall again and again until it is destroyed on the server and that destruction event is replicated to the client.
 

Rajada

Member
Jan 21, 2008
213
0
16
rajada.tumblr.com
Okay, I guess I misunderstood what bNetTemporary means. That and that function shouldn't be simulated, that was a typo from an older version. But tell me, there was also this code:

Code:
simulated function ProcessTouch (Actor Other, Vector HitLocation)
	{
		if ((Other != instigator) && (Rocket(Other) == none)) 
			Explode(HitLocation,Normal(HitLocation-Other.Location));
	}

That second condition strikes me as a little odd, I can't seem to grasp what it means or what it does... would (Rocket(Other) == none) mean that if and only if the rocket is gone it should explode?
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
(Rocket(Other) == None) means that if you typecast the touched actor to class rocket, the typecast must fail for the condition to be met. The typecast will either fail if the touched actor got a call to Touch before the Projectile and self-destructed, or if the touched actor is not a subclass of Rocket.
 

Rajada

Member
Jan 21, 2008
213
0
16
rajada.tumblr.com
Grrr... now it passes through players even though it exploded... once it explodes on a wall it goes away, and it still occasionally explodes multiple times.