image change attribute

starcatstarcat Member Posts: 107
edited November -1 in Working with GS (Mac)
ok, im trying to make a weapon store,

the idea is when the player clicks on the weapon, it destroys the actor and deducts the proper amount of gold. thats the easy part..

the part i cant seem to get working is the picture change in the HUD.

i thought it would be as simple as When mouse is clicked, do the gold behavior, destroy this actor, then Change attribute, Game.hud.display = image.self of the sword or whatever.. but its not changing the Hud image at all.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Just a straightforward Change Image behavior, updating appropriate attributes maybe? should be OK.

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

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Sorry, for variables, I meant attributes, ta.

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

  • starcatstarcat Member Posts: 107
    ya, but im trying to change the HUD attribute. for example i can kill an enemy.. gain 50 gold. and it shows 50 gold. i can go to the store.. click on a weapon and buy it and it takes 50 gold away, but i cant seem to make that weapon picture show up in the hud.

    i have the weapon itself set to deduct 50 gold and destroy itself.

    but i also tried to change an attribute to the HUD to add the image of itself(the sword) to the HUD. since the Change image doesnt have any kind of Tag i can attach to it im stuck.. i cant be like "change image of this"

    its just like destroy actor. its always destroy this actor, not destroy another actor.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I get what you mean; try a boolean for each item in your store; example, GunTaken, CrossbowTaken, etc (whatever weapons you have!) all set to false. When selected, change attribute to true. In your HUD, in the actor that'll show the weapon, put when GunTaken is true Change Image to Gun, etc,.

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

  • starcatstarcat Member Posts: 107
    ok im trying to do that now..but the HUD actor wont seem to find the boolean from my sword.. the sword has it..but the hud wont find it... is that a bug??
  • starcatstarcat Member Posts: 107
    nevermind i think i figured out my issue. trying now.
  • starcatstarcat Member Posts: 107
    ok i think it will work.. ic cant figure out how to make it true.. is it +true or +1 or 1 or how do you do it?
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    to set a boolean true you change it to true and to set it to false to use change attribute to false. Just type it out.

    believe you can also use 0 for false and 1 for true but I never do that so so cannot 100% confirm it.

    ___________________________________________________________________________________
    TEMPLATES AND PROJECT HELP BY TENRDRMER. CLICK HERE!!!

    AppSolute Entertainment on Facebook
    AppSolute Entertainment on iTunes
  • starcatstarcat Member Posts: 107
    ok so its set attribute, game.whatever.whatever to Game.whatever.whatever true

    correct?
Sign In or Register to comment.