alright, im emulating the Q3AMutator and got this now:
Mutator:
Code: Select all
class QuakengMutator expands Mutator;
var() globalconfig bool bTeleportEffect;
var() globalconfig bool bTeleportSound;
simulated function PreBeginPlay()
{
local QuakengTeleNotify Tele;
local ScriptedPawn S;
if(bTeleportEffect)
Tele = Spawn(Class'QuakengTeleNotify');
if(bTeleportSound)
Super.PreBeginPlay();
}
SpawnNotify:
Code: Select all
class QuakengTeleNotify expands SpawnNotify;
simulated event Actor SpawnNotification(Actor A)
{
local Actor O, OG;
local Vector L, LA;
local Rotator R, RA;
local class<Actor> aClass;
if(A.IsA('UTTeleportEffect'))
{
O = A.Owner;
L = A.Location;
R = A.Rotation;
A.SetCollision(False,False,False);
A.Destroy();
aClass = class<Actor>(DynamicLoadObject("QuakengEffects.QuakeTeleportEffect", class'Class'));
if(aClass == None)
return None;
A = Spawn(Class'QuakeTeleportEffect',O,,L,R);
if(A == None)
return None;
}
return A;
}
so now whats left open is bTeleportSound
i guess this should be done with a sub-class from DeathMatchPlus as explained by Rocky
Code: Select all
function PlayTeleportEffect( actor Incoming, bool bOut, bool bSound)
{
local QuakeTeleportEffect PTE;
if ( bRequireReady && (Countdown > 0) )
return;
if ( Incoming.bIsPawn && (Incoming.Mesh != None) )
{
if ( bSound )
{
PTE = Spawn(class'QuakengEffects.QuakeTeleportEffect',Incoming,, Incoming.Location, Incoming.Rotation);
PTE.Initialize(Pawn(Incoming), bOut);
PTE.PlaySound(sound'QuakengSounds.Tele2',, 10.0);
}
}
}
so if i make the sub-class of DeathMatchPlus with only this, would that be all thats needed for the sub-class?
and how can the "if(bTeleportSound)" 'activate' the sub-class of DeathMatchPlus?
--Edit by UnrealGGecko--
wauw the Mutator + SpawnNotify works
although only the first 2 times spawning has the original teleport sound(Resp2A)
after spawning 2 times, there is no teleport sound at all, not by spawning and not by teleporting
so now: how to complete the scripts?