[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
Battlefield Modding Tutorials BFMODS • View topic - Emitters!

Battlefield Modding Tutorials BFMODS

Battlefield Modding Tutorials
It is currently Fri Apr 19, 2024 9:13 pm

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Emitters!
PostPosted: Mon Sep 14, 2009 9:22 am 
Offline
User avatar

Joined: Sun Dec 31, 2006 12:13 am
Posts: 2027


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Emitters!
PostPosted: Mon Sep 14, 2009 3:12 pm 
Offline

Joined: Thu Mar 15, 2007 2:22 pm
Posts: 1253


Last edited by freddy on Mon Sep 14, 2009 3:57 pm, edited 1 time in total.

Top
 Profile Send private message E-mail  
 
 Post subject: Re: Emitters!
PostPosted: Mon Sep 14, 2009 3:56 pm 
Offline
User avatar

Joined: Fri Oct 03, 2008 4:37 pm
Posts: 513
Location: Levelland, Texas

_________________
ImageImage
I have cameras in your head!


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Emitters!
PostPosted: Mon Sep 14, 2009 4:18 pm 
Offline

Joined: Thu Mar 15, 2007 2:22 pm
Posts: 1253


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Emitters!
PostPosted: Mon Sep 14, 2009 6:38 pm 
Offline
User avatar

Joined: Sun Dec 31, 2006 12:13 am
Posts: 2027


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Emitters!
PostPosted: Mon Sep 14, 2009 6:46 pm 
Offline

Joined: Mon Oct 09, 2006 12:51 pm
Posts: 782
If you want the red to only last for a few seconds, ColorRGBAOverTime is the code you want.

I'll explain what it does:

ObjectTemplate.colorRGBAOverTime 0/255/0/0/200|55/255/0/0/100|100/0/0/0/0

Every input in this code has 5 variables separated by slashes, and finally ending with a |

The first variable is time, it is a ratio of time 0 to 100 percent. So for instance if at the beginning of the effect I wanted a certain color I would type in 0, and lets say I wanted it to last 3 seconds and my time to live is 10 seconds, well then 3 is 30 percent of 10, so my first number is 30.

ObjectTemplate.colorRGBAOverTime 0/255/0/0|30/

Here I have RED as our base color, and I have added thirty to tell it what percentage of time will be used.

the Next 3 Numbers represent the color im going to be using. If I want red, I max out the red by putting 255/0/0, using photoshop or other programs I can get any color I want. Remember the values only range from 1 to 255. so my second value is that

ObjectTemplate.colorRGBAOverTime 0/255/0/0|30/255/0/0

My last variable is the Alpha, the alpha is just like RGB with a value from 0 to 255, and determines the transparency of the effect. 255 is fully opaque, 0 is fully transparent. so lets make it something in the middle, 128. Remember fully opaque effects will lag alot worse than semi-transparent ones.

ObjectTemplate.colorRGBAOverTime 0/255/0/0|30/255/0/0/128

I now have my first color, lets add a second one. If in a instant I wanted it to change to blue, well I need to make an instant change, so lets change that 30 to 31, and change the color. You start a new color with a |

ObjectTemplate.colorRGBAOverTime 0/255/0/0|30/255/0/0/128|31/0/0/255/128

Now at 31 percent time, the color will instantly change to blue, or rather fast anyway. All in all depending on how you code it the engine will create a ramp for the colors, and the inputs will tell the effect to change color throughout its life time. Experiment, and have fun!


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Emitters!
PostPosted: Mon Sep 14, 2009 7:43 pm 
Offline
User avatar

Joined: Sun Dec 31, 2006 12:13 am
Posts: 2027
Thanks archi, very helpful. I'll experiment and see what I get! :D


Top
 Profile Send private message E-mail  
 
 Post subject: Re: Emitters!
PostPosted: Mon Sep 14, 2009 7:54 pm 
Offline

Joined: Mon Oct 09, 2006 12:51 pm
Posts: 782
For separate effects on separate materials however...your probably going to have to make multiple effects


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 75 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group