Is there anything like a debug mode

IntelligentDesignerIntelligentDesigner Member Posts: 517
edited November -1 in Working with GS (Mac)
I'd like to see what some game attributes are. Any ideas how to view them to help determine why they are not performing as expected?

Comments

  • GamexcbGamexcb Member Posts: 179
    Make an actor and have it display the atribute with the display text behavior.
    Currently Gs does not have a debug mode.
    Hope that answer your question!
    -Gamexcb
  • IntelligentDesignerIntelligentDesigner Member Posts: 517
    I tried to make an actor and have it display the attributes, but it does not work...

    I am trying to use several integer fields to add up and then move the resulting value into game.totalvalue Nothing seems to work, since you cannot add the integers and display them into another attribute.

    Any help will be appreciated, I am beginning to think it would be far easier in xcode.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    what kind of code are you using in your attributes?
    make sure you are using the expression editor to build your expression, typing in the names of other attributes will not work.

    I've got an attribute called totalTime, which takes the adds up the values of 100 attributes, and does some math, and displays the results, so I know you can do it.
  • IntelligentDesignerIntelligentDesigner Member Posts: 517
    The expression editor does not list the attributes of the actors I have assigned to keep track of these integer attributes. There are 6 actors each has an integer attribute, clicking on them toggles the attribute from 1 to 0 or back. What I want to do is have a seventh actor have the totals added up and displayed. When I try to use the expression editor on the seventh actor, I can select game attributes, scene attributes, or attributes for that actor.

    How does yours work, Mulcahy?

    Thanks for any help...
  • adadoadado Member Posts: 219
    You have to have the six actor make their updates to game level attribute(s) and then the seventh actor can use them to do its thing. Clunky but the way its currently done in GS.

    If you edit the actual instance of the seventh actor, you can access more, but then you break simple re-use of the seventh actor prototype - which can cause other headaches when things need upating en masse. It also means more custom setup per scene.
  • IntelligentDesignerIntelligentDesigner Member Posts: 517
    Okay, so the six actors send their information to the game.attribute... How do you do this when each of the six might be changed at any point in time? Can't you just refer to the actor's attributes on the screen they are in? If not the game they are in?

    This does not make sense yet. What am I missing? The actors in question are sitting in the game on the screen, and are updated one by one. Then the seventh actor should be "touched" and update the game attribute with the current six values. The game.attribute needs to be polled once all six are done., you can't push them individually, since they can't accumulate over and over...

    Help?
  • adadoadado Member Posts: 219
    If you share a game level attribute between many actors, it is a headache for sure and won't really work if they could be pressed before previous usage was "clear". You could try giving them each their own game level attribute to use (that doesn't work too well with spawned actors) and then the seventh can poll all the attributes.

    You can edit the actor instances in the scene to pull each other's info but then you have to do that for each scene. Then if you make changes to the actor prototype for the actors in the scene who pull each other's info, you then cannot readily "push" the changes in the prototype down to the instances that were unlocked. If you did, you would have to re-create the custom "connections". Also, the scene level method I describe are for existing (i.e. placed) actors in the scene since you need to be able to navigate to them in the expression builder. So if you plan on having successive "waves" of the actor, you need to do something like move it off-screen when it is used-up/killed and then move it back on screen (in a "reset" state) when you want it to appear again (i.e. a faked spawn).
  • IntelligentDesignerIntelligentDesigner Member Posts: 517
    This is not good news for me. How do GameSalad developers handle preferences? These variables should be saved across game instances, but I cannot even save a preference within the current instance?

    All I really want to do is cue a selection at the app's startup, so that a later event is based upon the hidden choice.

    @adado, I will try your idea of storing each actors state in separate "game.attributes". Maybe that will work around the limitation.... Thanks for thinking out of the box, !
  • adadoadado Member Posts: 219
    Game level attributes persist throughout the current game play session until you change them during that game play session (i.e. at the menu screen or during game play). Scene level are per scene and are a preset list of attributes relating to camera and such. Actor level per life of the actor. You can utilize actor attributes at the actor prototype "level" or at the actor instance "level" (which opens up more possibilities but introduces some of those concerns I have already mentioned). If you don't grasp the prototype vs. instance bit, it is in the Wiki in the general GS use write-ups. They are akin to a class and instance of a class in normal programming languages (only they lack the ability to readily discover/use each other and thus all the hand wiring by way of game level attributes usage and/or actor instance - prototype breakin - within the scene).

    To save attributes to use the next time the app runs, there is "save attribute" and its corresponding "load attribute" behavior...they are in the Wiki I believe. Also, many forums posts on them (i.e. search).
Sign In or Register to comment.