Game Development Community

Changing DataBlock values outside the editor + Sound question + Particle Emitter Question

by DMT · in Torque 3D Beginner · 07/09/2010 (2:00 pm) · 0 replies

Hi guys,

I am trying to change the properties of objects by changing the value instead their datablocks. I usually try and use something like this :

flash.setFieldValue(Brightness, 0);

In the previous example I am trying to change the brightness property of a PointLight from whatever to zero.

As far as I can tell, it changes but it does not update. I notice that it changes in the editor, but not when done through script or console.

In regards to this I have several questions :

Is this method a proper way to change these options? If so, how would I apply the changes? If not, in what way could I modify things like that.

And while I am posting any way, I figure I will ask about sounds. I was trying to create a soundEmitter object but I was unable to do so. I placed one in the world editor and selected a working OGG file I had. I tried to trigger it using the play command with no luck, I fiddled around with various options like radius, volume, etc to no avail. Does anyone have some quick hints in regards to this problem?

I also have a question regarding particle emitters. How can I control them ingame? Apart from modifying the datablocks how would I control things like velocity and lifetime?


Thank you.