GameSalad

Disappearing display text attribute

saad1993saad1993 Posts: 47Member, BASIC

I'm having this strange problem where an Index Game attribute (game.BulletCount) disappears after increasing to 1.
The blue bullet has a rule that increases the game.BulletCount by 1 every time it spawns randomly. In the GIF attached, the attribute increases by 1 and then disappears.

This is basically for debugging, everything else seems to work fine except this. Have also attached image of rules in display text.

Is this a glitch?

image" alt="" title="" />

image

Comments

  • saad1993saad1993 Posts: 47Member, BASIC
    edited October 11

  • pHghostpHghost London, UKPosts: 1,990Member

    It seems the whole actor disappears, not the Attribute or Text Display.

  • saad1993saad1993 Posts: 47Member, BASIC

    @pHghost said:
    It seems the whole actor disappears, not the Attribute or Text Display.

    What to do?

  • pHghostpHghost London, UKPosts: 1,990Member
    edited October 11

    What other rules are in the actor? Apart from the Display Text?

  • tatiangtatiang Posts: 10,969Member, Sous Chef, PRO, Senior Sous-Chef

    @saad1993 said:
    What to do?

    Provide more information. :)

    I'm guessing the Display Text isn't by itself? And if it is, there's more to the story here... how are you increasing the value of game.PlayerCount? What happens if you make things really SIMPLE and just have a Display Text without a rule condition and a change attribute in a Timer in the spawner actor? Does that work properly to display the value? Are you destroying any actors that are related to those two behaviors (display text and change attribute)? Are you destroying the spawner actor at some point?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • saad1993saad1993 Posts: 47Member, BASIC

    @tatiang said:

    @saad1993 said:
    What to do?

    Provide more information. :)

    I'm guessing the Display Text isn't by itself? And if it is, there's more to the story here... how are you increasing the value of game.PlayerCount? What happens if you make things really SIMPLE and just have a Display Text without a rule condition and a change attribute in a Timer in the spawner actor? Does that work properly to display the value? Are you destroying any actors that are related to those two behaviors (display text and change attribute)? Are you destroying the spawner actor at some point?

    The Display Text is by itself in a single actor i.e. the white box that disappears. There is no rule condition in the display actor.

    The value of game.PlayerCount is increased by 1 every time a Player is spawned (The Player are the blue boxes that spawn and move). The rule to do that increment is in the Player actor. So every time Player spawns, game.PlayerCount increases by 1.

    The X and Y coordinates are game. attributes that show the location of the Player(blue box) closest to the Enemy i.e. the red box. This is so that the Enemy can move away from the Player and not collide and die. The Enemy has no rules right now, that is another problem.

    PlayerID is the attribute that is increased by 1 every time a Player(blue box) moves off-screen. This new ID is then given to the next Player(Blue box) closest to the Enemy(red box).

    Right now I am using the display boxes for on-screen debugging to make sure that the mechanics are working and my Enemy Actor can in fact make use of the location of the Player(Blue boxes) and move away. The debugging is going bad because the PlayerCount actor is disappearing altogether, so I can't tell whether it moves further from 1.

  • tatiangtatiang Posts: 10,969Member, Sous Chef, PRO, Senior Sous-Chef

    If you can, upload either the current project file or a stripped-down version. I bet we can find the problem fairly quickly given the full ruleset. Sounds like a frustrating problem!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • saad1993saad1993 Posts: 47Member, BASIC

    @tatiang said:
    If you can, upload either the current project file or a stripped-down version. I bet we can find the problem fairly quickly given the full ruleset. Sounds like a frustrating problem!

    And that leads us to another problem. For some very buggy reason, all my gsproj files are zero bytes. I'm not sure what I should ZIP up and upload.

  • tatiangtatiang Posts: 10,969Member, Sous Chef, PRO, Senior Sous-Chef

    Um... well, that's a whole separate problem that you may need to contact Support about.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • saad1993saad1993 Posts: 47Member, BASIC

    Will this work for you? It's a ZIP.
    https://ufile.io/rd4fu

  • tatiangtatiang Posts: 10,969Member, Sous Chef, PRO, Senior Sous-Chef

    Yes. The bad news is that it works fine on my Mac:

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Posts: 10,969Member, Sous Chef, PRO, Senior Sous-Chef
    edited October 11

    @pHghost said:
    It seems the whole actor disappears, not the Attribute or Text Display.

    Try deleting that actor from the project (not just the scene but actually deleting the actor entirely) and adding a new actor with a Display Text behavior. Maybe that part of the xml got corrupted.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.