Ued2: script does not work when recompiled

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

laszo

New Member
Jan 12, 2005
2
0
0
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 ... :)).
 
Last edited:

XepptizZ

What are you lookin at...
May 17, 2004
486
0
0
35
In solitude
laszo said:
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?

Well, I might with my limited scripten SkillzZ. First of, when you make a subclass, you don't have to put ANYTHING in that script, but it will work just fine.

The UT way;

UT works with a system where everything has a parent. The absolute masterclass is "Object" but we only get to see "actor" That class is like the grandgrandgran father of all classes, thus every subclass or "child" inherits it's properties. This happens automaticly and whenever a new subclass is made or exists, it's always a child of the higherclass, as known as the "parent"class.


If you listened carefully you'll understand the system and why you don't need to copy past the lines of the higher class.

this is what you could do: Subclass teleporter and add a line wich tells him wich sound to play at the right moment, dunno nothin about this.
Or you could subclass Navigationpoint, with your teleporter and then your copy past technique should work. Also mind that it might not be the teleporter creating the sound, but the "UTteleeffect"actor ,located in Effects, wich the teleporter uses.

This system may look difficult when you need to find how stuff is done, but it's also a lot easier, because you don't need to code that much.
 

ReD_Fist

New Member
Sep 6, 2004
1,404
4
0
64
Michigan
I thnk the teleporter effect and sounds are pawn stuff,it doesnt come from the telporter.You more than likely have to make a new gametype,then edit all the pawn-bot-player to not have an effect from using a teleporter.

It's the same for quad damage,and double jump,the "pawn" is the "user" of the class,soo ALL the pawns do the same things and get the same effects and shield damage degredation and so on.

Cause i would want to take out that spawn effect for the tele,but

good luck.
 
Last edited:

ReD_Fist

New Member
Sep 6, 2004
1,404
4
0
64
Michigan
Mister_Prophet said:
It does come with the teleporter.

in 7 Bullets, the mod linked below, we used a script for a silent teleporter that teleports pawns without any sounds or portal effects.

I was refering to ut2004
BTW

but ut seems alot more easy to modify stuff, I like it better,ut2004 is so dang cumbersome to do or change the slightest little thing,compared to ut.
 

XepptizZ

What are you lookin at...
May 17, 2004
486
0
0
35
In solitude
ReD_Fist said:
I was refering to ut2004
BTW

but ut seems alot more easy to modify stuff, I like it better,ut2004 is so dang cumbersome to do or change the slightest little thing,compared to ut.

Ahem, the title says Ued2.

And Laszo, you don't need to edit your post when you want to say somethin, you can just post a new reply.