Sign in to follow this  
Followers 0
Shield

Scripting a FX

6 posts in this topic

Hey Forum,

 

Today at testing a trap, at my map there come every time at pressing f an error ("unintialised variable "boom.origin")

At this trap i want that there is playing a explosion which kills the players in this radius.

 

My script:

main()
{
maps\mp\_load::main();
 	
game["allies"] = "marines";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "desert";
game["axis_soldiertype"] = "desert";

level._effect["c4explosion"] = loadfx ("explosions/aa_explosion");

thread trap8();
}

trap8()
{
	trigger = getEnt ("trig_trap8","targetname");
	c4 = getent ("C4","targetname");
	trigger waittill ("trigger",player);
	for(i=20; i>0; i--)
	iPrintLnBold(i);
	playfx(level._effect["c4explosion"], (boom.origin))
	RadiusDamage (boom.origin, 500, 800,200, player);
	c4 delete();
}

Idk why this error coming... 

 

 

 

0

Share this post


Link to post
Share on other sites

You haven't declared what boom.origin is,

to make it work you must have something like this:

boom = getEnt("boom", "targetname" );

(this must be like a script_origin for it to work)

0

Share this post


Link to post
Share on other sites

Thanks. It works :) 

 

Other question to fx.

 

when i like to have fx like fire,airstrike,electric can i script it so like this too or must i create an extra _fx file ?

 

Anyone have a good video how to create a own fx, i mean not this with changing the colours of the fx. I mean how to create new fx. I heard that sheep wizzard did a video about it but i cant find this.  

0

Share this post


Link to post
Share on other sites

 

when i like to have fx like fire,airstrike,electric can i script it so like this too or must i create an extra _fx file ?

 

 

Do you mean with a brand new FX how to put a FX inside the map like these or the excisting ones from COD4 it self? If you mean the excisting ones then search with the Effects Editor.

0

Share this post


Link to post
Share on other sites

I meanboth first this with the custom fx at modtool. Bec. before this other way i have put a fx in map with _fx file with maps\mp\_fx::loadfx.........

 

How i can create new fx, like electric or lights, etc ?

i cant find any video about it. 

 

Sentrex i have seen you have some awesome fx. You have created this yourself ?

 

how i can add sound to this fx ? must i write an extra csv file , or can i load it like an effect ?

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