For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

Beam Emitter Offset in Networked Game

The section related to UnrealScript and modding. This board is for coders to discuss and exchange experiences or ask questions.
Post Reply
User avatar
Rocky
OldUnreal Member
Posts: 99
Joined: Mon Nov 18, 2013 9:21 am

Beam Emitter Offset in Networked Game

Post by Rocky »

Hi.

So I am spawning a simple beam emitter with BeamTargetType as BEAM_OffsetAsAbsolute and setting the end offset as HitLocation got from weapon's TraceFire function. This works fine in offline mode, but in online mode the end offset is always Vector(0, 0, 0). I can't figure out why it is not working.

This is how I spawn the beam called from TraceFire function:

Code: Select all

simulated function SpawnSniperBeam(vector Start, vector End)
{
	local SniperBeamEffect beamEffect;
	
	if(Pawn(Owner) == None)
		return;
	
	beamEffect = Spawn(Class'SniperBeamEffect ', Pawn(Owner),, Start, rotator(End - Start));
	if(beamEffect != None)
	{
		//Array_Insert(beamEffect.BeamTarget, 0, 1);
		beamEffect.BeamTarget[0].Offset = End;
	}
}
These are the properties of beam emitter:

Code: Select all

class SniperBeamEffect  extends XBeamEmitter;

defaultproperties
{
    Segments=10,
    MaxParticles=1,
    TurnRate=100
	BeamTargetType=BEAM_OffsetAsAbsolute,
    LifetimeRange=(Min=1.00,Max=1.00),
	ParticleStyle=STY_Translucent
	ParticleColor=(X=(Min=1.000000,Max=1.000000),Y=(Min=0.300000,Max=0.300000),Z=(Min=0.000000,Max=0.000000))
    ParticleTextures=Texture'FX_Beam'    
    FadeInTime=0.05,
    FadeOutTime=0.80,
    StartingScale=(Min=1.50,Max=1.50),
    bUseRelativeLocation=True,
    RemoteRole=ROLE_SimulatedProxy,
    LifeSpan=1.00,
    bSkipActorReplication=False,
	TextureUV(0)=0.00
	TextureUV(1)=0.00
	TextureUV(2)=0.00
	TextureUV(3)=1.00
}
Post Reply

Return to “UScript Board”