Game Development Community

Add Data to Time Graphs

by Rob Sandbach · in Torque Game Builder · 09/23/2006 (3:41 am) · 4 replies

Hey,

At one point im pretty sure we were able to add time/scale propeties to a graph in script; but it seems like this functionality has been removed, at least in the documentation....

The reason I ask is I want to randomly generate RGB values at different intervals along my particle life for each streak of a firework, to create some unique and interesting fireworks.....

Anyone know if this functionality is still opn in the engine but just not supported/documented? Or am I imagining it ever happened? Would love some help!

Thanks all

Rob

#1
09/23/2006 (3:32 pm)
Check out the feature tutorial on particle effects in your TGB docs directory. That covers the time/value attributes of editing particles.
#2
09/23/2006 (4:12 pm)
I understand how to use the level editor, but the functionality I was looking was for example:

$myParticleEffect.addgraphkey(%graph, %time, %scale); for example.

Was this never an option?
#3
09/24/2006 (3:57 pm)
Did you try it? Some of the methods are just undocumented currently and will work fine.

I imagine that if that feature was in then it would still be there.

Were you looking for addDataKey?

I'm pretty sure that stuff is editable from script somehow. Let us know if you get it working.
#4
07/03/2007 (2:10 pm)
It takes two calls - one to select the graph, a second to add the key:
$myParticleEffect.selectGraph(%graph);
$myParticleEffect.addDataKey(%time, %value);

The graph stays selected though, so you only need that call once for the keys you add to a given graph.