Hi,
I was experimenting with the teleporter actor (actually I wanted to make a teleporter without sound). I thought that I might be able to do this by modifying its script. I created a new class called 'SilentTeleporter' and pasted the code of the script of the original teleporter actor (verbatim, no changes at all) to make a starting point for modifications. It was compiled w/o errors, but when I used the new actor in my map, it did not work: no teleport action, no sound, nothing (ok, you may say that I got my silent teleporter after all .
Any ideas why this happened?
-------------------------------
Thanks for the tips!
I finally got rid of the sound effect. It was quite simple: extended the class 'teleporter' and overrode the function 'PlayTeleportEffect'. The code looks like this now:
var() sound TeleSound;
var() int SoundVolume;
var() int SoundRadius;
function PlayTeleporterEffect(actor Incoming, bool bOut)
{
PlaySound(Telesound, float(SoundVolume)/128, float(SoundRadius)*25);
}
This works and plays the sound specified in 'TeleSound', but the timing is wrong (i.e. first the player is teleported and then the sound plays). So it needs more work, but I think it can be done (I hope ... .
I was experimenting with the teleporter actor (actually I wanted to make a teleporter without sound). I thought that I might be able to do this by modifying its script. I created a new class called 'SilentTeleporter' and pasted the code of the script of the original teleporter actor (verbatim, no changes at all) to make a starting point for modifications. It was compiled w/o errors, but when I used the new actor in my map, it did not work: no teleport action, no sound, nothing (ok, you may say that I got my silent teleporter after all .
Any ideas why this happened?
-------------------------------
Thanks for the tips!
I finally got rid of the sound effect. It was quite simple: extended the class 'teleporter' and overrode the function 'PlayTeleportEffect'. The code looks like this now:
var() sound TeleSound;
var() int SoundVolume;
var() int SoundRadius;
function PlayTeleporterEffect(actor Incoming, bool bOut)
{
PlaySound(Telesound, float(SoundVolume)/128, float(SoundRadius)*25);
}
This works and plays the sound specified in 'TeleSound', but the timing is wrong (i.e. first the player is teleported and then the sound plays). So it needs more work, but I think it can be done (I hope ... .
Last edited: