Sign in to follow this  
Followers 0
Sentrex

[WIP] mp_dr_highschool (name will be changed)

61 posts in this topic

To make the effect move by itself you have to get a little creative :)

Basically, make a nonsolid nonsight texture (found in the tools section) and give it a targetname. Make it a brushmodel and give it a targetname like effectorg.

Then call it up in script using the targetname effectorg like so;

fxorigin = getent( "effectorg", "targetname" );
Then link the effect to the brushmodel.

Your effect then has to be looped so it continues playing. So make sure the effect doesn't loop already in fxeditor and instead goes in one short burst. Once you know it does you just create a for loop and have it play every 0.05 seconds using wait 0.05; at the end of the loop.

If you want to stop and start the effect you can either make the loop only loop x amount of times or define a boolean to wait for that will stop it using if statements.

If you want it to follow the player you simply link it to the player rather than the brushmodel.

0

Share this post


Link to post
Share on other sites

Well yes, but how the trap works is so it's always actied and just randomly travels across the room (don't know how to make the fx move by itself) and then when the Activator activated it's it gets linked to him so he can run around and try to catch the players himself (I think I know how to do this part).

 

 

Did you link it to self.origin?

fx()
{
    trig = getEnt ("trigger_fx" , "targetname");
    trig waittill("trigger", player);
    iprintlnbold ("sentrex is nublet"); 
    while(isAlive(self))
    {
        playFx( level.fx , self.origin );
        wait .1;
    }
}
I tried helping Gabe with this earlier.. Not sure if it will work try testing it
Than this won't work i guess zack found it somewhere then :P

 

But like darmuh said, you play a fx on a origin or something, give that origin a targetname. I did a newbie version way of doing it in colourful which was activated when some one touched the trigger.

 

Here an example

 

7qt9smY.png

 

http://i.imgur.com/7qt9smY.png

 

As you can see, I've given the origin a targetname of the FX

 

TnbcCxi.png

 

http://i.imgur.com/TnbcCxi.png

 

Then here the trigger activating

 

This way is a newbie of doing it, i wouldn't advise doing it if you have loads of flames like me because it will take awhile and you can easily mess up, but anyway I've made it shorter compared to colourful version  :P

 

////////////////////////FIRE///////////////////////////////////
fire()
{
	trig = getEnt ("lossyflame_trig", "targetname"); // trigger of fx
	fire1 = getEnt ("lossyred_efx2", "targetname");
	

	trig waittill ("trigger");
	trig delete();
	{
		playFx( level.effect1, fire1.origin ); //playFx( fx.targetname, fx.origin.targetname );

	}
}
0

Share this post


Link to post
Share on other sites

Thanks a lot everyone, I'll need to have a crack at it later in the week! I'm off to the coast now!

0

Share this post


Link to post
Share on other sites

Just make it so you can set him on fire

And then play "This girl is on fireeeeeeeeeeeeee"

 

You should change the model with a female model huehehe

0

Share this post


Link to post
Share on other sites

Shame there are no 'dead' female models

The pilot yo

0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0