Quote:
Originally Posted by i8bit
I have a question. This is a really neat tool, but can I change the particles startx and starty?
I want the starting.x to be 0 and the y to be int(random(0, screenheight))
I am trying to make clouds float by.
|
You mean to start each individual particle on a random spot in the left side of the screen?
For that you want the code-equivalent of this:
PHP Code:
addLocalModifier("once", 0, 0, "y", "replace", 0, screenheight);
With the editor you can get half-way there like this:
PHP Code:
scope: local
timetype: once
rangemin: 0
rangemax: 0
variable: y
operator: replace
valuemin: 0
valuemax: 512
Because the editor doesn't support variables, you have to manually replace the above 512 with
screenheight in the generated code.
The modifier only happens once so if the player changes the size of the game's window, you'll have to reload the script, or remove and reapply all modifiers (complicated).