So here is how I have found the commands to work.
There is quite a bit of commands that do stuff "overTime" so I will only explain the most important ones.
For example here are the commands I speak of:
Code: Select all
rem *** Particles only ***
ObjectTemplate.alphaOverTime
rem *** SpriteParticles Only ***
ObjectTemplate.colorRGBAOverTime
rem *** Both ***
ObjectTemplate.gravityModifierOvertime
ObjectTemplate.sizeOverTime
I will now explain how to use the over time settings which pretty much applies to all the others for the most part.
First an example of the code for colorRGBAOverTime on a sprite:
Code: Select all
ObjectTemplate.colorRGBAOverTime 0/255/255/255/255|50/128/128/128/128|100/0/0/0/0

The numbers represent Red Green Blue and Alpha. In that order! First number is Red, next number is Green, number after that is Blue, and the last one is alpha. (higher number equals more opacity)
Now that accounts for the vec4. There is a fifth number. it's the very first number of each string. First sequence starts at 0 middle sequence starts at 50 and last one is at 100. (but this can vary if you have more time increments in the command)
Example: 50/255/255/255/255
First number is time in percentage of the timeToLive set for the sprite. So 50% or halfway through it's timeToLive it will transition to that color and alpha for the sprite in question. Each sequence is seperated with a pipe charactor. " | ". There is a minimum of two strings but for things more complex there can be 3 or more. (100 possible settings?) I've never seen a string exceed 100. So it's safe to assume the time setting is always a percantage of the timeToLive of the sprite. 0 being the start of the sprite's existance and 100 being the end of it. So in theory there is a max of 100 different time values you can define. (though this will result in very long command string.

So to change the color halfway through the sprite's timeToLive then fade to zero (and make the sprite invisible) you do this:
Code: Select all
ObjectTemplate.colorRGBAOverTime 0/128/128/128/255|50/255/255/255/255|100/0/0/0/0

The sprite will "transition" from the last setting to the next between two sequence numbers. So it will "fade" from the first setting to the next that is set to 50, then fade to zero at the 100 mark.
Now to do more complicated stuff like make a sprite fade quckly to full color at start then remain the same for half it's life then fade to zero quickly, you do this:
Code: Select all
ObjectTemplate.colorRGBAOverTime 0/0/0/0/0|25/128/128/128/255/75/128/128/128/255|100/0/0/0/0
Now for gravity or size over time it's not much different. For size:
Code: Select all
ObjectTemplate.sizeOverTime 0/1|50/1.25|100/2
Remember the size set here is relative to the particle/sprite's size setting so remember to set it correctly.
For example 1 is 100 percent it's set size and 0.5 is half it's normal size. To make a sprite go larger instead of smaller, simply use a number higher then 1. The size number is NEVER a negative number! Not that I have seen so I don't know what happens if you use negative numbers. Since the size of a sprite/particle is never set as a negative number it's safe to assume it's not going to have negative numbers in this command either!
So to have a sprite expand from zero size to full size then shrink to zero size at the end of it's timeToLive you do this:
Code: Select all
ObjectTemplate.sizeOverTime 0/0|50/1|100/0
Now for the last one I will explain is the gravityModifierOverTime command. Now unlike the size command this command CAN have a negative number. Positive number makes the sprite fall, and a negative number makes it rise.
Code: Select all
ObjectTemplate.gravityModifierOverTime 0/1|50/0|100/-1
So to have a sprite rise then float at halfway point then fall you do this:
Code: Select all
ObjectTemplate.gravityModifierOverTime 0/-1|50/0|100/1
And the last one I'll go over quickly is AlphaOverTime for particles only. Sprites use the color command to define the alpha combined with it's color so sprites don't use this command.
Basically it works the same as the size command. I haven't played around with this command so I am only making an educated guess here. But 1 should no alpha and 0 is full alpha. Example:
Code: Select all
ObjectTemplate.alphaOverTime 0/1|70/1|100/0
That explains the most important ones. There are others but they pretty much function the same as the ones I described above. So happy coding folks!
