what is a global integer attribute and how to i create one

wroachbarrettewroachbarrette Member Posts: 101
edited November -1 in Working with GS (Mac)
what is a global integer attribute and how to i create one

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    global integer is something that can be changed by any actor via the change attribute behaviour. you create by;

    going to a scene

    Under inspector on the left hand side you have 'Actors', 'Attributes' and 'Scene'. Go into attributes and use the + sign to add an attribute, you can select its type, integer is for whole numbers
  • firemaplegamesfiremaplegames Member Posts: 3,211
    In the left hand side of GameSalad Creator, find the Attributes tab. Click on that, and then click on the little plus button [+].
  • jweaver911jweaver911 Member Posts: 439
    Shouldn't it be specified whether he should use the game attribute versus the scene attribute?
  • wroachbarrettewroachbarrette Member Posts: 101
    jweaver911 said:
    Shouldn't it be specified whether he should use the game attribute versus the scene attribute?

    heres my situation I need to set a condition so that when all the actors of a cretin tag are destroyed that it will move to another sean can you tell me how to do this
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi wroachbarrette

    Possibly one way is: a new Scene attribute, called CretinCount, being how many "cretin" tagged Actors there are. Each time one of these are destroyed, set up a rule: when attribute scene.Cretincount > 0, Change Attribute: scene.CretinCount to scene.CretinCount-1. Also another rule with when attribute: scene.CretinCount = 0 then Change Scene.

    I think that's the sort of thing you're after: hope it helps.
    :-)

    ---------------------------------------------------------------
    Spiral Gyro Games
    Website one day but don't hold your breath... ;-)

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

  • wroachbarrettewroachbarrette Member Posts: 101
    ok this is how i set it up, i created an intiger attribute that was equal to 7 (the number of enimies) then i created a rule that said when this actor is destroyed change game.enemy.count to enemy.count-1(do i need to change that to game.enemy.count-1?) then in my control i created a rule that said when game.enemy.count = 0 to change to next sean but when the enemy count reaches 0 or in other words when i eliminate all the enemies it does nothing.
  • wroachbarrettewroachbarrette Member Posts: 101
    gyroscope said:
    Hi wroachbarrette

    Possibly one way is: a new Scene attribute, called CretinCount, being how many "cretin" tagged Actors there are. Each time one of these are destroyed, set up a rule: when attribute scene.Cretincount > 0, Change Attribute: scene.CretinCount to scene.CretinCount-1. Also another rule with when attribute: scene.CretinCount = 0 then Change Scene.

    I think that's the sort of thing you're after: hope it helps.
    :-)

    ---------------------------------------------------------------
    Spiral Gyro Games
    Website one day but don't hold your breath... ;-)

    ok this is how i set it up, i created an intiger attribute that was equal to 7 (the number of enimies) then i created a rule that said when this actor is destroyed change game.enemy.count to enemy.count-1(do i need to change that to game.enemy.count-1?) then in my control i created a rule that said when game.enemy.count = 0 to change to next sean but when the enemy count reaches 0 or in other words when i eliminate all the enemies it does nothing.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Off the top of my head, I guess you have to put when game.enemy.count = 0 then Change Scene in every one of your enemy actors, just after where you tell it to be destroyed with whatever condition you've given it. Hopefully that should do the trick for you. I think ;-)

    ---------------------------------------------------------------
    Spiral Gyro Games
    Website one day but don't hold your breath... ;-)

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

  • wroachbarrettewroachbarrette Member Posts: 101
    ok this is how i have it set up[when actor revieves event overlaps or collides with actor with tag repub destroy this actor change atribute game.enemy.count to enemy.count-1 "then i added a rule" attribute game.enemy.count = 0 change sean next sean] but when all are destroyed it does not change to the next sean
  • wroachbarrettewroachbarrette Member Posts: 101
    ok this is how i have it set up[when actor revieves event overlaps or collides with actor with tag repub destroy this actor change atribute game.enemy.count to enemy.count-1 "then i added a rule" attribute game.enemy.count = 0 change sean next sean] but when all are destroyed it does not change to the next sean
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Um; do want a peanut? ;-)

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

  • wroachbarrettewroachbarrette Member Posts: 101
    :P do you have any idea what i may be doing wrong?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi wroachbarrette, unfortunately not. I'm not certain whether you tried the following or not:
    gyroscope said:
    I guess you have to put when game.enemy.count = 0 then Change Scene in every one of your enemy actors, just after where you tell it to be destroyed with whatever condition you've given it....Should do the trick for you. I think ;-)

    It'd be perhaps easier for someone else or myself to help if we had a bit more detail of the structuring of your Rules. I guess the only way to find out is if you upload and allow for a download. Maybe try that?

    ;-)

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

  • wroachbarrettewroachbarrette Member Posts: 101
    yea or better yet do you possess a skype account? or if you have a mac an aim or an ichat accout?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Good thinking on your part, but I haven't a skype, aim or an ichat account unfortunately. I really do think though that making it a shared project is the best option; that way more than one other pair of eyes can look at it with the possibility of help for you. (Plus there are many other Forum members much more experienced than I am).

    :-)

    ---------------------------------------------------------------
    Spiral Gyro Games

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

  • wroachbarrettewroachbarrette Member Posts: 101
    ok, im a little bit of a newb with this kind of thing how exactly do i do that? create a shared project people can look at
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    No prob, wroachbarrette (I'm relatively new here as well). In the Icon Bar of the Project Editor window, click the button marked Publish. You'll then be presented with a dialog box which says: Please choose a target platform. The button you want is marked GameSalad.com. click the button and then...I don't know! (I've yet to upload anything to GS's servers). But I think it's just a few straightforward fields for title, what it's about, etc; plus a button (which you want to check) to allow people to download it as a game file. As a suggestion, in the field that asks for the description, put the problems you're having, any help appreciated in solving it, that sort of thing; so people know it's not a demo or something.

    And although I can't promise that I personally will solve it for you, I'll keep a look out for it and have a go (if I'm not beaten to it by someone else first...;-)

    :-)

    ---------------------------------------------------------------
    Spiral Gyro Games

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

  • wroachbarrettewroachbarrette Member Posts: 101
    ok i uploaded the game or at least a version of it its not what the game will be it just has the same idea
Sign In or Register to comment.