Page 1 of 1

Adding Custom Effects.

Posted: Wed Sep 07, 2011 3:04 am
by jmrg2992
Well here's the thing, i got a custom effect, rigth, and i want to show it after a certain flag, and then after another flag take it off, electricyemmiter seems like a good way but i can't edit the effect that's inside him ( electric charges), and i can't use the mission script cuz my effect doesn't have the code for BinWorld var and P-enterworld and stuff, is there anyposible way to do this ?, or i must have to change the code ?, and plz write it Im a newby at coding xd.

Re: Adding Custom Effects.

Posted: Wed Sep 07, 2011 10:37 am
by DDL
missionscript, but use bHidden=true/false?

Mind you, emitters and the like are often hidden anyway, so for those you'd want to toggle them on/off instead.

So

Code: Select all

if(emitter.bIsOn)
     emitter.TurnOff();
Or the reverse (TurnOn();) for turning it back on again.

BUT; whether you use an emitter or not depends largely on what your actual effect IS, so some more detail would be helpful.

Re: Adding Custom Effects.

Posted: Wed Sep 07, 2011 6:16 pm
by jmrg2992
well more details, lets see i created a class from the LaserProxy from Orinignal DX, i want to find a way to know how to show it on game, some friend told me to do it on mission script like this script i made out

Code: Select all

Class Mission30 expands MainMissionScript;

Function EffectCall()

 { 
      if (flags.GetBool('LaserStart'))

          Spawn(class'DeusExMainMainLaser')

But he says i must have to put location rotataion and that stuff, thing that i don't know how to. also i want to show my effect after a trigger, or a flag, and hide it after another trigger or flag, so how i could do it ? knowing that LaserProxy doesn't have the variable Binworld,

Re: Adding Custom Effects.

Posted: Thu Sep 08, 2011 12:10 am
by jmrg2992
Hmmmmm i just found that Bhidden, now how i activate it via mission script ?

Re: Adding Custom Effects.

Posted: Sun Sep 11, 2011 9:26 pm
by DDL
Laserproxys are not what you want to spawn.

Ok.

Laser emitters are invisible actors (i.e. already hidden) which then generate an iterator that updates contantly to spawn a series of meshes in a line based on settings determined by the proxy.

The laserIterator and LaserProxy by themselves are entirely useless, since the core of their function relies on them communicating with the LaserEmitter that spawned them.

So, what things like "Emitter.TurnOff();" and so on do is tell the emitter to stop emitting. Making it suddenly bHidden will do nothing, since it is already bHidden, it's a totally invisible actor that spawns visible effects. Turning it off makes it into a totally invisible actors that DOESN'T spawn visible effects.


Soooo...hence my question regarding detail: what I actually want to know is ..what is your effect? Laser emitter and electricity emitter are basically hardcoded to generate a repeated incidence of a particular mesh in either a straight line or a wobbly line, and that is essentially IT. If you effect involves something being generated in a line, then you're looking in the right place. If it doesn't, then it's time to rethink.

Re: Adding Custom Effects.

Posted: Tue Sep 13, 2011 8:25 pm
by jmrg2992
Well never mind a friend of mine gave me one idea, to pick up a vehicle like chopper, and put the mesh of the laser and put it into that vehicle,anything else were just coding stuff on the mission script and i i'll leave the code here if anyone need it .

Code: Select all

Function Timer()

{

        local ScriptedPawn pawn;
	local LaserAttack Laser;

     Super.timer();

if (flags.GetBool('Laser_Attack'))
		{
			foreach AllActors(class'LaserAttack', Laser)
				Laser.EnterWorld();
		}
}