Thread: Particle Editor
View Single Post
  #22  
Old 07-17-2013, 07:44 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by i8bit View Post
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"00"y""replace"0screenheight); 
With the editor you can get half-way there like this:
PHP Code:
scopelocal
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).
__________________
Testbed user: I figured since I can never find any scripters it was time to take desperate measures...and...TEACH MYSELF 0.0
Reply With Quote