custom respawn/teleporter effects

Discussions about Coding and Scripting
OwYeaW
Experienced
Posts: 81
Joined: Fri Jan 09, 2015 4:24 pm

custom respawn/teleporter effects

Post by OwYeaW »

yo

i need a custom teleporter that has its sounds and effects replaced

i think theres atleast 2 ways of making this:

1. a teleporter actor that has its custom sounds and effects
2. a mutator actor to place in the map that replaces the sounds and effects (this would also replace the players respawn sounds and effects, which fits my needs perfectly)

with 2. ive seen this in some already existing mutator whereby it replaces the respawn/teleport effects with a custom effect
ive looked into the script but cant understand how its done, im not experienced with scripting

so if anybody is out here that has the knowledge to help me create this actor i would really appreciate it if you contact me or post a reply :)
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: custom respawn/teleporter effects

Post by Chamberly »

So you are looking for a decorative change on the respawn and teleporter's sprite and sounds of it? I heard plenty of it...

-I know [OMA]'s mutator (not sure which one) have an effect that have music played upon spawn.
-I have a custom sniper mutator that use different translocating sounds and the sprite of disappearing.
-I think the respawn and teleporter sprite and sounds is easy to do...

let me know what you think so I can get on the same page.
Image
Image
Image Edit: Why does my sig not work anymore?
OwYeaW
Experienced
Posts: 81
Joined: Fri Jan 09, 2015 4:24 pm

Re: custom respawn/teleporter effects

Post by OwYeaW »

yes, a mutator actor that can be placed in a map which will change the default respawn/teleport effect, should be pretty simple right?
ive already made the desired custom effect and sound so now its all about the mutator
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: custom respawn/teleporter effects

Post by Barbie »

OwYeaW wrote:with 2. ive seen this in some already existing mutator whereby it replaces the respawn/teleport effects with a custom effect
Maybe that effect is configurable in the mutator? Can you provide a download link that we can have a look?

<EDIT>
Replaced quoting with the correct one :oops:
</EDIT>
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
OwYeaW
Experienced
Posts: 81
Joined: Fri Jan 09, 2015 4:24 pm

Re: custom respawn/teleporter effects

Post by OwYeaW »

Barbie wrote:
OwYeaW wrote:with 2. ive seen this in some already existing mutator whereby it replaces the respawn/teleport effects with a custom effect
Maybe that effect is configurable in the mutator? Can you provide a download link that we can have a look?
http://www.mediafire.com/download/c9wsj ... Q3v1.2.zip
its not configurable in the mutator
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: custom respawn/teleporter effects

Post by Chamberly »

Barbie wrote:
OwYeaW wrote:with 2. ive seen this in some already existing mutator whereby it replaces the respawn/teleport effects with a custom effect
Maybe that effect is configurable in the mutator? Can you provide a download link that we can have a look?

<EDIT>
Replaced quoting with the correct one :oops:
</EDIT>
It can be made for an easy change. I'd probably take a look too and find a way to have less spawn lag for the graphic.
Image
Image
Image Edit: Why does my sig not work anymore?
OwYeaW
Experienced
Posts: 81
Joined: Fri Jan 09, 2015 4:24 pm

Re: custom respawn/teleporter effects

Post by OwYeaW »

OwYeaW wrote:
Barbie wrote:
OwYeaW wrote:with 2. ive seen this in some already existing mutator whereby it replaces the respawn/teleport effects with a custom effect
Maybe that effect is configurable in the mutator? Can you provide a download link that we can have a look?
http://www.mediafire.com/download/c9wsj ... Q3v1.2.zip
its not configurable in the mutator
you can find it in the Q3AMutator, at its properties look in General, there youll see "bEnableQ3RespawnEffect"
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: custom respawn/teleporter effects

Post by Barbie »

That's the core of the mystery:

Code: Select all

class Q3TeleNotify extends SpawnNotify;

simulated event Actor SpawnNotification(Actor A)
{
	local Actor O, OG;
	local Vector L, LA;
	local Rotator R, RA;
	local class<Actor> aClass;
	//local NTeleEffect NTE;

	if(A.IsA('UTTeleportEffect'))
	{
		O = A.Owner;
		L = A.Location;
		R = A.Rotation;

		A.SetCollision(False,False,False);
		A.Destroy();

		aClass = class<Actor>(DynamicLoadObject("Q3Weaps.Q3TeleEffect", class'Class'));

		if(aClass == None)
			return None;

		A = Spawn(Class'Q3TeleEffect',O,,L,R);

		if(A == None)
			return None;
	}

	return A;
}
And no, it's not configurable, "Q3Weaps.Q3TeleEffect" is hard coded there.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
OwYeaW
Experienced
Posts: 81
Joined: Fri Jan 09, 2015 4:24 pm

Re: custom respawn/teleporter effects

Post by OwYeaW »

so is it possible to 'extract' the code that replaces the respawn effect?
and on top of this add another code that replaces the respawn sound?

ive already made the effect i want to use, theres an option to put in sounds for the effect in "EffectSound1", but the sound volume is really low, can it get louder?
Spectra
Masterful
Posts: 542
Joined: Tue Jan 22, 2013 5:23 pm
Personal rank: Nullified!
Location: (X) Unable To Locate....

Re: custom respawn/teleporter effects

Post by Spectra »

TeleEffect sound is written in DeathMatchPlus.

Code: Select all

function PlayTeleportEffect( actor Incoming, bool bOut, bool bSound)
{
 	local UTTeleportEffect PTE;

	if ( bRequireReady && (Countdown > 0) )
		return;

	if ( Incoming.bIsPawn && (Incoming.Mesh != None) )
	{
		if ( bSound )
		{
 			PTE = Spawn(class'UTTeleportEffect',Incoming,, Incoming.Location, Incoming.Rotation);
 			PTE.Initialize(Pawn(Incoming), bOut);
			PTE.PlaySound(sound'Resp2A',, 10.0);
		}
	}
}
If you have XC_Engine, then it is possible to replace the teleport sound by using the ReplaceFunction maybe.

Code: Select all

ReplaceFunction( class 'DeathMatchPlus', Class 'MyMutator', 'PlayTeleportEffect', 'PlayMYTeleportEffect' );
Another way is just make a sub-class of DeathMatchPlus and rewrite the PlayTeleportEffect() function with your sound which is inefficient.
OwYeaW
Experienced
Posts: 81
Joined: Fri Jan 09, 2015 4:24 pm

Re: custom respawn/teleporter effects

Post by OwYeaW »

Another way is just make a sub-class of DeathMatchPlus and rewrite the PlayTeleportEffect() function with your sound which is inefficient.
so since i want to use it for a teamgame, should i make a sub-class of TeamGamePlus?
and how bad is this inefficiency?

ive never heard of XC_Engine, i will seek knowledge about it.
by the way, i want this mutator to be inside the map, not anything server related.
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: custom respawn/teleporter effects

Post by Chamberly »

OwYeaW wrote:
Another way is just make a sub-class of DeathMatchPlus and rewrite the PlayTeleportEffect() function with your sound which is inefficient.
so since i want to use it for a teamgame, should i make a sub-class of TeamGamePlus?
and how bad is this inefficiency?

ive never heard of XC_Engine, i will seek knowledge about it.
by the way, i want this mutator to be inside the map, not anything server related.

Now you want the mutator to be inside the map? I haven't gone this far yet...

About XC_Engine: viewtopic.php?f=34&t=5624
I made a tutorial if it help. https://sites.google.com/site/ut99gotyd ... stallation
Last edited by Chamberly on Tue Jan 10, 2017 9:14 pm, edited 1 time in total.
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: custom respawn/teleporter effects

Post by sektor2111 »

OwYeaW wrote:Another way is just make a sub-class of DeathMatchPlus and rewrite the PlayTeleportEffect() function with your sound which is inefficient.
From where did you get this "inefficient" idea ? Who told you that ?
OwYeaW wrote: so since i want to use it for a teamgame, should i make a sub-class of TeamGamePlus?
and how bad is this inefficiency?
I don't know who is trying to fool you, guys. A GAME-TYPE is offering opportunity to write everything how you want and even fixing wrong default things, overriding default fuctions with your own and adding extra stuff which is more simple than having headaches with a mutator. Is this inefficient in fixing/adding stuff ? You lost me here.
OwYeaW wrote: ive never heard of XC_Engine, i will seek knowledge about it.
Q.E.D. (Quand Era Demonstrandum) at what I was saying lasts weeks...

Btw, I'm playing only games rewritten by me because I'm the guy ignoring inefficiency myths ( NsDM NsCTF NsTDM ) rewritten before last XC_Engine capable of rewriting functions, and these games are very listed in default UT browser because they have the name as defaults with no issues. Inefficient... suuure :lol2: .
Spectra
Masterful
Posts: 542
Joined: Tue Jan 22, 2013 5:23 pm
Personal rank: Nullified!
Location: (X) Unable To Locate....

Re: custom respawn/teleporter effects

Post by Spectra »

sektor2111 wrote:From where did you get this "inefficient" idea ? Who told you that ?
So you will make new gametype just for replacing teleport effect or sound?? Good luck with making a long GameType list.
I once did that when I was making my Q3Mod, then cancelled it. Download some shit mods like Weaponer, WeaponLord, LaserGib, CombatZone, etc where authors did make a mutator for replacing weapons, but they also added gametypes for just replacing weapons and nothing else.

Another story is the AssaultBonusPack, where you will get new GameType - "Assault the Base" just with stuff like displaying FortStandards, SpawnProtect, etc which could have been done by mutator too.

Maybe the word "inefficient" was inappropriate.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: custom respawn/teleporter effects

Post by sektor2111 »

Like I said and I'm Being Constantly ignored, a new game-type means Every Thing Solved - see Loathsome's works as well. You can handle "killed", "scorekill", SpawnEffect, all default stuff can be turned into a nice thing if you are a good designer. What is that nasty ? Is not only a Stupid spawn effect in cause is EVERY code where EPIC were mooing stuff. Else see These functions how are reacting "TeamGamePlus" on purpose in presence of some creature added in map - yeah "great". That's why they were changing game-types for a better handling and afaik getting rid of retarded DMMutator which I'm no longer using for months.
DMMutator has raw replacement having 0 deal with Decorations holding stuff, yeah, do a check at default ReplaceWith.
And a Bit of coding. I don't get this thing used by people in a Mutator.

Code: Select all

Super.PostbeginPlay();
WHY ? Who is the parent who needs this call ? Let me see - NOBODY.
Mutator doesn't have it and is Info. Info doesn't have it and is an Actor. Actor has it EMPTY

Code: Select all

//
// Called immediately after gameplay begins.
//
event PostBeginPlay();
Why do we need this null execution ? Or why do we need to call PostBeginPlay from other mutators ? They are automatically done by Engine and they doesn't need any stupid helper at all. While I have read more info - more I have learned quitting using useless stuff.
The fact is a new Game-type is handling better game-speed by rewriting even stuff from "gameinfo" which is not that much doable with mutators, main game controller is almighty power, you can even call other "config" mutator Before BaseMutator if you want a general war with BotPack ( that crap with bNoMonsters=True ) and nothing can stop your job at this point. I'm not sure if you get what I mean... but I tried to point you to other direction.
Last edited by sektor2111 on Tue Jan 10, 2017 9:23 pm, edited 1 time in total.
Post Reply