Is it just me, or does Expression Editor for Particles not work completely?

ChakkuChakku Member Posts: 1,513
edited March 2013 in Working with GS (Mac)
Hey guys,

So I was trying to increase the quantity of particles depending on a constantly changing attribute. I did it all as you would imagine, I hit the 'e' for expression editor and inputted my preferred attribute (and, yes, I checked to see that I am inserting an index attribute and not a boolean)

[Expression Editor DOES work properly in particles for non-changing attributes]

Am I missing something really stupid, or is this a bug with GameSalad Creator (I'm on the Mac Creator)?

Thanks
Chakku

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited March 2013

    Hello @Chakku attributes in the Particles Behaviour, as long as they're put in via the expression editor - as you've done, all work well, but any new attribute value change means the Particles Behaviour has to be triggered again (i.e the same way the first time was triggered).

    Example, if particles are produced from the behaviour from When touch is pressed Rule, then when one of the parameters as an attribute is changed, not only will it not affect those particles already there, but won't take effect until there's another When touch is pressed Rule.

    Another example, if the initial particle behaviour is triggered by a boolean to true, to make the particles react to a change in one of the attributes, the boolean needs to be made false again, then straightaway true again to retrigger with the changed value(s). Hope that helps.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • ChakkuChakku Member Posts: 1,513
    @gyroscope

    Thanks for your input, but that's not my problem! (At least I don't think so)

    My problem is trying to have the quantity of the be a continuously changing index attribute.

    This is the problem I'm experiencing-

    https://dl.dropbox.com/s/us05m75zcxixn9x/ParticlesProblem.zip?token_hash=AAGxeK7pzrFDD6hJ3Wnejy50HDtajODmNWbR1ThEI1toew&dl=1

    Thanks again,
    Chakku
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited March 2013

    Hi @Chakku I haven't looked at your file yet (although just about to download it)... from your explanation, a continuously changing attribute won't work because the Partical Behaviour hasn't any constrain capabilities built into it's code, if you see what I'm saying... and even if this attribute was constrained outside of the Particle Behaviour in a Constrain Attribute Behaviour, The Particles value would need to be retriggered constantly for it to work with an ever-changing value.... (not even certain that would ever be made to work if it's changing so really fast....)

    I'll be interested to see which value you need constrained in a Particles behaviour...I'll take a look now...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • ChakkuChakku Member Posts: 1,513
    edited March 2013

    I'll be interested to see which value you need constrained in a Particles behaviour...I'll take a look now...
    @gyroscope
    Actually this was just a quick demo that I made :p

    **In my project, I'm trying to have the # of particles reflect how much energy you have, the # of particles are meant to go up as your energy bar increases (and go down when you use up your energy, and your energy bar decreases).

    Thanks for the clarification, it makes sense to me now :)
    Chakku
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited March 2013

    I see you have no touch or attribute trigger to start....but, for the record, I forgot to mention that another type of trigger is a Timer set to Every! (Like you have already...)

    OK, couple of things: first to say, you haven't put an image in. (Set Image is set to No value). Second, put the Particles Behavior in the Timer Rule, under the Change Attribute. Next, it might work better (I can't remember with my test) if you start the value of scene.particle cnt as 1.

    It still may need some tweeking to get the effect you're after though but it'll work for you now...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Yeah, you would have to have different instances of the particle behavior in the actors rules triggered by attributes at certain levels of energy. Like @gyroscope explained, you won't be able to use one particle behavior, and change its internal attributes. You would need different instances of the behavior triggered, to turn a certain particle behavior with specified settings on, and the others off.
  • ChakkuChakku Member Posts: 1,513

    For the record, I forgot to mention that another type of trigger is a Timer set to Every! (Like you have already...)

    OK, couple of things: first to say, you haven't put an image in. (Set Image is set to No value). Second, put the Particles Behavior in the Timer Rule, under the Change Attribute. Next, it might work better (I can't remember with my test) if you start the value of scene.particle cut as 1.

    It still may need some tweeking to get the effect you're after though but it'll work for you now...
    @gyroscope
    Thanks a lot! My mistake was to put the Particles behavior in the timer IN ADDITION to the change attribute! I do need to do some tweaking, but you've been a great help :D

    Thanks again,
    Chakku

    P.S. I'm not sure if having a new particles behavior initiate every 1,000th of a second affect FPS, but I will keep this thread updated about that :p
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    You're welcome, @Chakku, glad I could be of help!

    Two last things tho':
    My mistake was to put the Particles behavior in the timer IN ADDITION to the change attribute!
    Well, you didn't actually do that in the gamefile you supplied.... what I'm suggesting is that this IS what you do to get it up and running... (see attached screengrab)

    Also a point to make: when you use this programming "lump" in a game, I'd recommend - only if you need to stop the process at any time -- unchecking the Run To Completion in the Timer, and putting all of it in another Rule: When ParticlesStop ---boolean-- is false

    This way, all you need to do is set ParticlesStop to true when you need to stop it all.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Whoops, forgot to attach the screen grab.... here it is....

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.