Is this a bug or am I doing something wrong?

MarkOnTheIronMarkOnTheIron Member Posts: 1,447
edited November -1 in Working with GS (Mac)


At first I thought that it was the otherwise bug but since it persisted after the last update it must be something else.

First of all a description of what you're seeing:
- This is based on the move to grid demo by Deep Blue App. I changed some rules but the basic movement are there.
- The stretched arrow actor is the one that moves on the grid.
- The arrow buttons move the Stretched arrow actor on the grid.
- The two long actors are LeftCenter and Right, they are constrained to Stretched arrow and are used as a "line of sight".
- The four square actors on the center are triggered by the two long actors and each produce a unique self integer depending on the distance from the arrow actor and change some game attributes depending on the self one.
- The square actors on the right are there to visualize the game attributes that are changed.

There are two main problems here:

1) As you can see there's a rule to change the self attribute to -1 if they don't collide with the long actors or the arrow one. However when one of the square actors collide with the arrow actor AND the Left long actor it should automatically change the self to 0 but instead it remains as -1. The strangest thing is that if I don' t move the arrow actor but instead I just rotate it, when it collides again it correctly change it to 0. The opposite happens when the collision is with the arrow actor AND the right long actor: in that case it work as expected and change the self to 16 but if I don't move the actor and just rotate it, when it collides again the attribute goes to -1.

2) This is also a strange things. On the central squares actors I put other rules that say: if self.attibute=0 then change attribute distance0 to 1 (otherwise change distance0 to 0) and so on for 30 attributes.
This is made so that I know what actors I'm colliding with and at what distances and trigger some precise actions that depends on it. However this works well with the collisions triggered by the left long actor but when it come to the right long actor it happens that the attributes change correctly if the actor is just rotating and not moving but if it moves the change attribute behaves inconsistently.

Here are a screenshot of the rules that are in the four square actors on the center and that I suspect are the culprits:
http://imageshack.us/photo/my-images/14/rulesmu.png/

I don't know what to do. I can't understand if this is some weird bug or if it is just some bad rule of mine. It's too hot where I am to concentrate clearly. Also sorry for the bad english, if you don't understand something I've written I will try to explain it better.

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    I posted a bug regarding self.attributes a while back and they confirmed it's a bug.

    Mine was a little less complex than this though :) but if i had more than one actor on scene using a self.boolean i needed to touch them both instead of just one to make the actor fall down.



    Darren.
  • LumpAppsLumpApps Member Posts: 2,881
    I had a similar problem when copying actors on the scene (with option drag).
    I guess the attributes get an id which isn't changed in different instances of the same actor.

    Workaround is to open every instance of an actor on the stage and ad a new self.attribute where you can refer to in the behaviors and rules.

    Cheers.
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Yeah, I imagined it could be the self attribute causing the problem.

    I thought about unlocking the instances but this would mean a big pain and a huge drop in performance. Look at the images below:

    http://imageshack.us/photo/my-images/84/rules2w.png/

    On the left is the xml file of the scene on the video, it is 20 Kb in size.

    On the right is the same scene but with the four square actors unlocked, it is 143 Kb in size.

    In the final scene there will be about 50 or more of those actors in one scene, imagine what it would mean.
    I will also send a bug report to GS and see what they can do.

    ________________________________
    【ツ】iPhone Icon Pack 【ツ】 - 【ツ】Graphic Pack【ツ】
    Free GS demo: High score simple and advanced; Game Center; App Rating System
Sign In or Register to comment.