Sign in to follow this  
Followers 0
Fahman

Fire trap script.

7 posts in this topic

Try this, I don't know if it works:


fogfx()//this is just a thread name
{
	origin = getEnt("weather","targetname");
	weathertrig = getEnt("weather_trig","targetname");
	hurt = getEnt("placehere_the_name_of_trigger_hurt","targetname");//This is for trigger_hurt
	hurt enablelinkto(); //hurt links to brush 
	hurt linkto(spikegoesup1); //this is with hurt enablelinkto
	
	
	
	weathertrig waittill("trigger");
	origin waittill( "trigger", user );
	trig delete();
	
	wait 20;
	
	PlayFX(level.weather , origin.origin);
}
0

Share this post


Link to post
Share on other sites

It would appear you're asking on the forums for every little thing that you want to do, I would suggest at least trying to do them yourself before making a topic. If you just use scripts that people provide for you then you'll never learn.

 

Now I'll try and talk you through how to go about figuring something out yourself.

 

So, fire an effect right? So somehow you're going to need to play and effect after activation. But how can you find out what to type in the script?

 

http://zeroy.com/script/ expand all, Ctrl+F (find) and try searching keywords that may be  related to playing an effect.

 

When you type 'effect' it will show you the 'Effects' category, with 11 different functions listed. It would appear to be fairly obvious that ''playFX'' is the most fitting. And there, you've found the function you need.

 

I'm sure somewhere else in your script you've made something wait until the trigger is activated. You can copy that over and just change the variables "blah = getEnt( "blah", "targetname" )"

 

You can open 'EffectsEd' from your compile tools and open effects to look at what they're like in-game, then you must load the effect.

 

I'm going to leave it here so you can figure it out for yourself, you'll learn A LOT more by doing things this way instead of asking everything.

 

Best of luck!

Before you ask anymore questions on this topic, try googling the answer. It's amazing what you can find.

0

Share this post


Link to post
Share on other sites

 

Try this, I don't know if it works:


fogfx()//this is just a thread name
{
	origin = getEnt("weather","targetname");
	weathertrig = getEnt("weather_trig","targetname");
	hurt = getEnt("placehere_the_name_of_trigger_hurt","targetname");//This is for trigger_hurt
	hurt enablelinkto(); //hurt links to brush 
	hurt linkto(spikegoesup1); //this is with hurt enablelinkto
	
	
	
	weathertrig waittill("trigger");
	origin waittill( "trigger", user );
	trig delete();
	
	wait 20;
	
	PlayFX(level.weather , origin.origin);
}

dont post if you have absolutely no idea what you are doing :dumb:

0

Share this post


Link to post
Share on other sites

fire()
{
trig = getent("trigger_fire", "targetname");
dmg = getent("fire_dmg", "targetname");
dmg maps\mp\_utility::triggerOff();

fireorg1 = SpawnFx( level.fire_fx, fire1.origin);
fireorg2 = SpawnFx( level.fire_fx, fire2.origin);
fireorg3 = SpawnFx( level.fire_fx, fire3.origin);
fireorg4 = SpawnFx( level.fire_fx, fire4.origin);
fireorg5 = SpawnFx( level.fire_fx, fire5.origin);
fireorg6 = SpawnFx( level.fire_fx, fire6.origin);
fireorg7 = SpawnFx( level.fire_fx, fire7.origin);
fireorg8 = SpawnFx( level.fire_fx, fire8.origin);

trig waittill ("trigger");
trig delete();
dmg PlayLoopSound ("fire_barrel");
dmg maps\mp\_utility::triggerOn();
triggerFx (fireorg1);
triggerFx (fireorg2);
triggerFx (fireorg3);
triggerFx (fireorg4);
triggerFx (fireorg5);
triggerFx (fireorg6);
triggerFx (fireorg7);
triggerFx (fireorg8);
wait 5;
dmg delete();
fireorg1 delete();
fireorg2 delete();
fireorg3 delete();
fireorg4 delete();
fireorg5 delete();
fireorg6 delete();
fireorg7 delete();
fireorg8 delete();
}

Just put the origins of where the fire should spawn on the ground, or wherever you want them, the fire will spawn there, and you'll be good, if you want this to loop, and turn on, and off, here's the script for that:

fire()
{
trig = getent("trigger_fire", "targetname");
dmg = getent("fire_dmg", "targetname");
trig waittill ("trigger", player);

while(1)
{
  dmg maps\mp\_utility::triggerOff();
  fireorg1 = SpawnFx( level.fire_fx, fire1.origin);
  fireorg2 = SpawnFx( level.fire_fx, fire2.origin);
  fireorg3 = SpawnFx( level.fire_fx, fire3.origin);
  fireorg4 = SpawnFx( level.fire_fx, fire4.origin);
  fireorg5 = SpawnFx( level.fire_fx, fire5.origin);
  fireorg6 = SpawnFx( level.fire_fx, fire6.origin);
  fireorg7 = SpawnFx( level.fire_fx, fire7.origin);
  fireorg8 = SpawnFx( level.fire_fx, fire8.origin);
  trig delete();
  dmg PlayLoopSound ("fire_barrel");
  dmg maps\mp\_utility::triggerOn();
  triggerFx (fireorg1);
  triggerFx (fireorg2);
  triggerFx (fireorg3);
  triggerFx (fireorg4);
  triggerFx (fireorg5);
  triggerFx (fireorg6);
  triggerFx (fireorg7);
  triggerFx (fireorg8);
  wait 5;
  dmg delete();
  fireorg1 delete();
  fireorg2 delete();
  fireorg3 delete();
  fireorg4 delete();
  fireorg5 delete();
  fireorg6 delete();
  fireorg7 delete();
  fireorg8 delete();
}
}

But really, like Sentrex said, I would suggest learning to script, instead of asking for everything, will pay off in the long run. Just use zeroy, have a look at map and stock scripts for call of duty, and it should come to you after awhile.

 

inb4 error

0

Share this post


Link to post
Share on other sites

fire()

{

trig = getent("trigger_fire", "targetname");

dmg = getent("fire_dmg", "targetname");

dmg maps\mp\_utility::triggerOff();

fireorg1 = SpawnFx( level.fire_fx, fire1.origin);

fireorg2 = SpawnFx( level.fire_fx, fire2.origin);

fireorg3 = SpawnFx( level.fire_fx, fire3.origin);

fireorg4 = SpawnFx( level.fire_fx, fire4.origin);

fireorg5 = SpawnFx( level.fire_fx, fire5.origin);

fireorg6 = SpawnFx( level.fire_fx, fire6.origin);

fireorg7 = SpawnFx( level.fire_fx, fire7.origin);

fireorg8 = SpawnFx( level.fire_fx, fire8.origin);

trig waittill ("trigger");

trig delete();

dmg PlayLoopSound ("fire_barrel");

dmg maps\mp\_utility::triggerOn();

triggerFx (fireorg1);

triggerFx (fireorg2);

triggerFx (fireorg3);

triggerFx (fireorg4);

triggerFx (fireorg5);

triggerFx (fireorg6);

triggerFx (fireorg7);

triggerFx (fireorg8);

wait 5;

dmg delete();

fireorg1 delete();

fireorg2 delete();

fireorg3 delete();

fireorg4 delete();

fireorg5 delete();

fireorg6 delete();

fireorg7 delete();

fireorg8 delete();

}

Just put the origins of where the fire should spawn on the ground, or wherever you want them, the fire will spawn there, and you'll be good, if you want this to loop, and turn on, and off, here's the script for that:

fire()

{

trig = getent("trigger_fire", "targetname");

dmg = getent("fire_dmg", "targetname");

trig waittill ("trigger", player);

while(1)

{

dmg maps\mp\_utility::triggerOff();

fireorg1 = SpawnFx( level.fire_fx, fire1.origin);

fireorg2 = SpawnFx( level.fire_fx, fire2.origin);

fireorg3 = SpawnFx( level.fire_fx, fire3.origin);

fireorg4 = SpawnFx( level.fire_fx, fire4.origin);

fireorg5 = SpawnFx( level.fire_fx, fire5.origin);

fireorg6 = SpawnFx( level.fire_fx, fire6.origin);

fireorg7 = SpawnFx( level.fire_fx, fire7.origin);

fireorg8 = SpawnFx( level.fire_fx, fire8.origin);

trig delete();

dmg PlayLoopSound ("fire_barrel");

dmg maps\mp\_utility::triggerOn();

triggerFx (fireorg1);

triggerFx (fireorg2);

triggerFx (fireorg3);

triggerFx (fireorg4);

triggerFx (fireorg5);

triggerFx (fireorg6);

triggerFx (fireorg7);

triggerFx (fireorg8);

wait 5;

dmg delete();

fireorg1 delete();

fireorg2 delete();

fireorg3 delete();

fireorg4 delete();

fireorg5 delete();

fireorg6 delete();

fireorg7 delete();

fireorg8 delete();

}

}

But really, like Sentrex said, I would suggest learning to script, instead of asking for everything, will pay off in the long run. Just use zeroy, have a look at map and stock scripts for call of duty, and it should come to you after awhile.

inb4 error

pls Zack. getentarray
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