Page 3 of 3

Re: custom respawn/teleporter effects

Posted: Thu Jan 12, 2017 9:33 pm
by Barbie
OwYeaW wrote:i tried to compile those subclasses but they gave errors at "PlayMyTeleportEffect(Incoming);"
Yes, because you didn't say already what exactly your new effects are. So I put this function PlayMyTeleportEffect(Incoming) as a placeholder:
Barbie wrote:You have to add your custom function PlayMyTeleportEffect(Actor Incoming) to all three Actors and do your custom effects there.
OwYeaW wrote:and just for clarification, this is what i need:
1. a custom PlayerStart that spawns a custom Sound and a custom Effect
2. a custom Teleporter that spawns a custom Sound and a custom Effect
If we should do the work we must know what your desired effects are. (And are you sure you really mean "Teleporter" instead of "VisibleTeleporter"?")

Re: custom respawn/teleporter effects

Posted: Thu Jan 12, 2017 9:39 pm
by OwYeaW
Barbie wrote:If we should do the work we must know what your desired effects are. (And are you sure you really mean "Teleporter" instead of "VisibleTeleporter"?")
the custom effect i want to use: QuakengEffects.QuakeTeleportEffect
the custom sound i want to use: QuakengSounds.Tele2

and yes Teleporter, i dont need the blue spinning mesh (of course i could always remove the mesh in its default properties so it doesnt really matter anyway)

Re: custom respawn/teleporter effects

Posted: Thu Jan 12, 2017 11:07 pm
by Barbie
OwYeaW wrote:so ill probably end up wasting hours on figuring out a few simple lines of code
For me it "only" took 2-3 hours all in all. :ironic:
Here you are:
Q3PlayerStart

Code: Select all

class Q3PlayerStart expands PlayerStart;


function PlayTeleportEffect(actor Incoming, bool bOut) {
	if (Incoming.IsA('Pawn'))
	{
		Incoming.MakeNoise(1.0);
		PlayMyTeleportEffect(Incoming);
	}
}

function PlayMyTeleportEffect(Actor Incoming) {
local class<Actor> aClass;
local PawnTeleportEffect MyEffect;

		MyEffect = Spawn(Class'Q3Weaps.Q3TeleEffect', , , Incoming.Location, Incoming.Rotation);

		if (MyEffect != None)
			MyEffect.PlaySound(sound'Q3Weaps.BattleOff',, 10.0);
}
Q3Teleporter

Code: Select all

class Q3Teleporter expands Teleporter;

function PlayTeleportEffect(actor Incoming, bool bOut) {
	if (Incoming.IsA('Pawn'))
	{
		Incoming.MakeNoise(1.0);
		PlayMyTeleportEffect(Incoming);
	}
}

function PlayMyTeleportEffect(Actor Incoming) {
local class<Actor> aClass;
local PawnTeleportEffect MyEffect;

		MyEffect = Spawn(Class'Q3Weaps.Q3TeleEffect', , , Incoming.Location, Incoming.Rotation);

		if (MyEffect != None)
			MyEffect.PlaySound(sound'Q3Weaps.BattleOff',, 10.0);
}
Because your desired sound "QuakengSounds.Tele2" is not part of Q3Weaps.u, I used "Q3Weaps.BattleOff" - just change that as you like (package must be loaded of course).

Test map attached (needs Q3Weaps.u).

If you only need these effects of the package Q3Weaps, you may consider including them also into your map or an additional map package instead of depending on a 27 MB package for just using 3 kB of it. But this is another chapter.

Re: custom respawn/teleporter effects

Posted: Fri Jan 13, 2017 5:46 am
by OwYeaW
Barbie wrote:For me it "only" took 2-3 hours all in all. :ironic:
i really appreciate your help and will be very thankful if i get my desired outcome

ive played your test map and it works perfectly as i desire
although, i myself am not able to recreate these actors

why: Log: Error in Q3PlayerStart, Line 19: Type mismatch in '='
as you can see this is the actor youve made, Q3PlayerStart inside your testmap TestQ3Teleporter.unr
ive only changed the sound file name and the effect file name
so whats the problem?

Code: Select all

//=============================================================================
// Q3PlayerStart.
//=============================================================================
class Q3PlayerStart expands PlayerStart;


function PlayTeleportEffect(actor Incoming, bool bOut) {
   if (Incoming.IsA('Pawn'))
   {
      Incoming.MakeNoise(1.0);
      PlayMyTeleportEffect(Incoming);
   }
}

function PlayMyTeleportEffect(Actor Incoming) {
local class<Actor> aClass;
local PawnTeleportEffect MyEffect;

		MyEffect = Spawn(Class'QuakengEffects.QuakeTeleportEffect', , , Incoming.Location, Incoming.Rotation);

		if (MyEffect != None)
			MyEffect.PlaySound(sound'QuakengSounds.Tele2',, 10.0);
}
line 19: MyEffect = Spawn(Class'QuakengEffects.QuakeTeleportEffect', , , Incoming.Location, Incoming.Rotation);

Re: custom respawn/teleporter effects

Posted: Fri Jan 13, 2017 7:34 am
by sektor2111
If classes changed doesn't exist or files are not loaded as dependencies, they won't compile not even next Christmas...
and yes, doing these in Map is not a hard task, like Barbie said.
Anyway I'll save such things for any possible future Level which I might do...

Re: custom respawn/teleporter effects

Posted: Fri Jan 13, 2017 8:20 am
by OwYeaW
sektor2111 wrote:If classes changed doesn't exist or files are not loaded as dependencies, they won't compile not even next Christmas...
and yes, doing these in Map is not a hard task, like Barbie said.
Anyway I'll save such things for any possible future Level which I might do...
again i have difficulties understanding your post, could you please be more clear?
i think i understand at least 1 thing; if all files are loaded before compiling, and yes ive loaded the textures, sounds and effect
so there should be something else thats wrong

Re: custom respawn/teleporter effects

Posted: Fri Jan 13, 2017 2:33 pm
by Barbie
OwYeaW wrote:line 19: MyEffect = Spawn(Class'QuakengEffects.QuakeTeleportEffect', , , Incoming.Location, Incoming.Rotation);
Every resource of UT is located in a file aka "package". If you want to use a resource, you must load the file containing it first. As your resource name "QuakengEffects.QuakeTeleportEffect) indicates, the package (file) name is "QuakengEffects". So go and search in your UT folders for a file matching pattern "QuakengEffects.*". Depending on its extension (UMX, UAX, UTX, U) you can use one of UnrealED's browser to load it (Music-, Sound-, Texture-, Actor-Browser). (In fact you can use any browser to load any package, for example loading an "U" file with the Music Browser, but you have to change the file mask first.)

Once the file is loaded you should be able to find the resource in one of the browsers. In this case I guess that you can find "QuakeTeleportEffect" in Actor Browser below Actor>Effects>PawnTeleportEffect. If you can see it there, the resource is present and code will compile.

Re: custom respawn/teleporter effects

Posted: Sun Jan 15, 2017 11:24 pm
by OwYeaW
OwYeaW wrote:and yes ive loaded the textures, sounds and effect
so there should be something else thats wrong
-- Post merge --
OwYeaW wrote:why: Log: Error in Q3PlayerStart, Line 19: Type mismatch in '='
-- UnrealGecko says hi :) --
sektor2111 wrote:If classes changed doesn't exist or files are not loaded as dependencies, they won't compile not even next Christmas...
and yes, doing these in Map is not a hard task, like Barbie said.
Anyway I'll save such things for any possible future Level which I might do...
i despise you for creating chaos in my thread

-- Stahhhhp! --

Re: custom respawn/teleporter effects

Posted: Mon Jan 16, 2017 1:06 am
by sektor2111
You can despise yourself for creating chaos in your thread by writing multiple posts in 24 hours - I might contact an admin for a small revision toward your missing the read of rules :wth: . Now you look for someone to blame based on your failures ? Calm down and check stuff - rushing doesn't help.
In other order you can put those packages here for a small inspection, somebody will tell you what's wrong and might help else I don't understand why are you asking help and then you get disturbed. Doesn't make sense :? . But because you have refreshed me, I'm gonna setup some effects by curiosity, and I'm not gonna reply nothing in your threads no worries.

Re: custom respawn/teleporter effects

Posted: Mon Jan 16, 2017 1:45 am
by Barbie
Still an error in the line 19 although all resources are loaded? Then change the data type of the variable that holds the new spawned actor to the same class as the spawn() function spawns. In concrete:
Instead of

Code: Select all

local PawnTeleportEffect MyEffect;

      MyEffect = Spawn(Class'QuakengEffects.QuakeTeleportEffect', , , Incoming.Location, Incoming.Rotation);
use

Code: Select all

local QuakeTeleportEffect MyEffect;

      MyEffect = Spawn(Class'QuakengEffects.QuakeTeleportEffect', , , Incoming.Location, Incoming.Rotation);
MyEffect should be the same data type as what you spawn.

Or do a type conversion.

Re: custom respawn/teleporter effects

Posted: Mon Jan 16, 2017 1:58 am
by OwYeaW
sektor2111 wrote:You can despise yourself for creating chaos in your thread by writing multiple posts in 24 hours - I might contact an admin for a small revision toward your missing the read of rules :wth: . Now you look for someone to blame based on your failures ? Calm down and check stuff - rushing doesn't help.
In other order you can put those packages here for a small inspection, somebody will tell you what's wrong and might help else I don't understand why are you asking help and then you get disturbed. Doesn't make sense :? . But because you refreshed me I'm gonna setup some effects by curiosity.
sigh, its getting such a waste of time dealing with ignorant fools over and over again
but, ill just keep on going, no matter how crazy you are, i think you should at least have an opportunity to learn
so hereby ive written down a few things for you

1. youve posted multiple times about off topic stuff
2. i did not blame anyone, apparently you are the one that puts a blame on someone
sektor2111 wrote:Calm down and check stuff - rushing doesn't help.
3. did i ever rush anything here on the forum? you should apply this wisdom yourself, just look at your own posts man
4. do you have a problem with my 3 posts in a row? just because its some kind of rule doesnt mean im abusing the forum
5. please be nice to each other man, im new here on the forum and honestly think you were distrubing in my thread, just check yourself

so, i have respect for people like barbie and rocky, these people contribute towards a positive direction, solving problems and sharing knowledge
im sure they are not the only ones on the forum that give great input, so you should have enough examples to learn from

-- Here we go again... MERGED! (UnrealGecko) --
Barbie wrote:Still an error in the line 19 although all resources are loaded? Then change the data type of the variable that holds the new spawned actor to the same class as the spawn() function spawns. In concrete:
Instead of

Code: Select all

local PawnTeleportEffect MyEffect;

      MyEffect = Spawn(Class'QuakengEffects.QuakeTeleportEffect', , , Incoming.Location, Incoming.Rotation);
use

Code: Select all

local QuakeTeleportEffect MyEffect;

      MyEffect = Spawn(Class'QuakengEffects.QuakeTeleportEffect', , , Incoming.Location, Incoming.Rotation);
MyEffect should be the same data type as what you spawn.

Or do a type conversion.
nice, ill be testing everything soon, ill make sure im doing everthing correctly

Re: custom respawn/teleporter effects

Posted: Mon Jan 16, 2017 2:33 am
by Chamberly
Please use EDIT for your post. Creating multiple reply posts is violating the rules.

viewtopic.php?f=1&t=149
4. do you have a problem with my 3 posts in a row? just because its some kind of rule doesnt mean im abusing the forum
Please note: Even you said you aren't abusing it, doesn't mean you can make excuse to bypass it.

Re: custom respawn/teleporter effects

Posted: Mon Jan 16, 2017 3:16 am
by OwYeaW
Chamberly wrote:Please use EDIT for your post. Creating multiple reply posts is violating the rules.

viewtopic.php?f=1&t=149
4. do you have a problem with my 3 posts in a row? just because its some kind of rule doesnt mean im abusing the forum
Please note: Even you said you aren't abusing it, doesn't mean you can make excuse to bypass it.
i already know about this, but good that youre giving clarity
although, i didnt say that im not abusing the forum so better make some notes for yourself about excuses
please lets stay on-topic now

Re: custom respawn/teleporter effects

Posted: Wed Jan 18, 2017 2:41 pm
by UnrealGGecko
Janitor Gecko reporting for duty! :ironic:

@OwYeaW I have merged your double-triple posts. Just making sure the thread won't be 20 pages long and spammed. Keep in mind that Sektors english is not 100%, so sometimes things he says ends up being a little on the not nice side. But all in all I don't think he ment harm. If anything he is a great member here :tu:

back on topic... wondering if this could be used for mapping, like a custom effect specifically for a certain teleporter (not a coder here, sorry)

Re: custom respawn/teleporter effects

Posted: Wed Jan 18, 2017 5:06 pm
by Chamberly
UnrealGecko wrote:back on topic... wondering if this could be used for mapping, like a custom effect specifically for a certain teleporter (not a coder here, sorry)
He did said it to be placed in a map so I'd say yes? Other than that, it's easy to customize a teleporter a bit I think.