Easy question: modify a parameter while the game is running.
Posted: Sun Jul 12, 2009 6:51 pm
I did not play very much with ZGE lately, due to university. Anyway, i still have some problems: i think i still do not understand the behaviour of some stuff.
I was amazed by the 'noise' stuff you can attach to a mesh (say, a sphere). I played a lot just by changing the parameters and looking the melting stuff moving.
I'd like to make a model composed by a sphere and a noise: my objective is to change some noise parameters when the game is running, obtaining the same "melting" effect i could manipulate in the editor.
So, i create a mesh, a noise, a model (plus a spawnmodel etc...). If i run the game, i see my static sphere: ok. Now i define a variable 't' and put something like:
in model's update page (pippo is the noise's name). But nothing changes. Maybe i put the expression somewhere wrong, may you help me?
I mean: ZGE sees no errors, but nothing moves.
I think my error is quite obvious, so pardon my noobiness. Anyway, i may upload a editable file if you think you should directly see what i did.
Very thanks in advance.
I was amazed by the 'noise' stuff you can attach to a mesh (say, a sphere). I played a lot just by changing the parameters and looking the melting stuff moving.
I'd like to make a model composed by a sphere and a noise: my objective is to change some noise parameters when the game is running, obtaining the same "melting" effect i could manipulate in the editor.
So, i create a mesh, a noise, a model (plus a spawnmodel etc...). If i run the game, i see my static sphere: ok. Now i define a variable 't' and put something like:
Code: Select all
pippo.NoiseSpeed.Y=sin(t)*10;
t+=0.1;
I mean: ZGE sees no errors, but nothing moves.
I think my error is quite obvious, so pardon my noobiness. Anyway, i may upload a editable file if you think you should directly see what i did.
Very thanks in advance.