Some rules stop working when gravity is on

DuesDues Member Posts: 1,159
edited March 2013 in Tech Support
When i set gravity i a scene, some rules wont work anymore. Any thoughts on this?

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    gonna need waaaaayyyyy more information. What are the rules, What all are the rules affecting, what else is happening in the actors that have rules not working…..
  • DuesDues Member Posts: 1,159
    edited March 2013
    @tenrdrmer

    Ive posted some rules here so you can se.

    Basically I have an actor that I can move around with my mouse (its supposed to be tossed when gravity is on) that collect items.
    When an item is collected I move the collected actor out of screen an call on that actor when i need it. When I complete a level I have a pause menu, and from that menu I can either "retry" "go to menu" or "next level". I have three booleans that triggers the different changes (reset,menu,next)
    When gravity is off all those things work perfectly, but when I go into scene an change the Y gravity to eg 800 all my buttons stop working properly. What happens is that instead of unpausing the game and trigger the booleans and attributes set up, the game just unpauses, after that nothing more happens and Im back to the scene the way it was before pausing.

    http://imageshack.us/a/img46/4538/skrmavbild20130324kl124.png
    http://imageshack.us/a/img11/4538/skrmavbild20130324kl124.png
    http://imageshack.us/a/img820/4538/skrmavbild20130324kl124.png
    http://imageshack.us/a/img23/4538/skrmavbild20130324kl124.png
    http://imageshack.us/a/img826/6378/skrmavbild20130324kl124y.png
    http://imageshack.us/a/img826/4538/skrmavbild20130324kl124.png


    Hope this makes it a little more clear :\">

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Well I'm not sure what gravity has to do with messing up your rules but they are messed up anyhow.

    You need to Think order or operations

    First of all if your rule is sold based on touch is pressed the behaviors in that rule will stop running if the touch is released before they are done. And secondly if the first behavior in the rule negates the rule or changes the scene everything else stops.

    So you have all of your unpause rules firing prior to the attribute changes. And your other rules negates the rule before the rest of it can run.

    Again I'm not sure why gravity would hurt this maybe since its using up ram those rules are not firing fast enough to account for the improper code...

    I would also suggest not using gravity and instead place an accelerate down behavior in each actor you want affected by gravity.

    Cheers
    Aaron.
  • DuesDues Member Posts: 1,159
    @tenrdrmer

    Thank you for your answers! Are all my rules messed up mainly because of the order, or are they just messed up totally? :-?
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    The ordering inside them is where I would start.

    If its still not working I would try to find a different way to reduce the touch is pressed rules down you just a change attribute.

    I would also probably not try to change an attribute a rule is based on from inside that rule at least not when there's a change or reset scene involved. maybe reset all of those attributes at the begining on the scene loading. Remember to make sure they reset before it gets back to the change scene or reset scene rule again.

    GS read the actors from the bottom of the the layer list to the top. And then the rules inside the actor from too to bottom.

    So you want your change attributes to reset everything in the very bottom actor at the very top if that actors rules list. Hope that helps its kinda tough explain it all from my phone but I think your on the right track.
  • DuesDues Member Posts: 1,159
    Ok! Thanks a lot!!
Sign In or Register to comment.