adding equiptable items?

Pennez-GamesPennez-Games Member Posts: 107
edited July 2012 in Working with GS (Mac)
i have been with gamesalad for little bit now, and i was wondering how to add equiptable items/weapons?
like for example:
you buy a gun from the gunshop in the game, and you click equipt, so the gun is now in your hands and you can shoot,
or;
your playing in the game, and you pick up an item which you can use and its equipted into your hands... help please. thanks

Answers

  • kinzuakinzua Member Posts: 554
    @soundwaveninja use an index variable for a Gun and another for Bullet type.. create a Table which includes what gun.. what bullet.. and what power.. have your logic designed around it..

    For eg.. if a player picks up a power.. the value of default gun changes from 1 to 4.. suppose.. this changes the image of gun and the corresponding bullets to spawn.

    Hope that helps.
  • Pennez-GamesPennez-Games Member Posts: 107
    @soundwaveninja use an index variable for a Gun and another for Bullet type.. create a Table which includes what gun.. what bullet.. and what power.. have your logic designed around it..

    For eg.. if a player picks up a power.. the value of default gun changes from 1 to 4.. suppose.. this changes the image of gun and the corresponding bullets to spawn.

    Hope that helps.
    hey ummm, just two questions
    (1) would doing this make the gun spawn in the actors hands?
    (2) iv got the pc version and i cant find the index attribute, :/
  • rommaromma Member Posts: 114
    Hi Sound,

    1) Not really, I'm guessing the character is starting out with an equipped item, I also assume you have the "items" X and Y constrained to the characters X and Y + displacement values, having said this, all you need to do is make a rule based on a the index or integer or even the table value and change image to the items image. Use that same attribute to change the values of the guns bullets, etc too.

    Technically

    if game.GunType = 1 > Change Image or / and
    if game.GunType = 1 > Change Attribute
Sign In or Register to comment.