smoke84's Forum Posts

  • I've included my capx. I was using instances of the array_monsters cause I have multiple stats for each monster and I don't know of any other way to store them in a single array for multiple monsters

  • Hello Everyone!

    I working on making a bestiary in my game. The idea is to push a button and a new layer becomes visible and gets populated with monsters you have obtained.

    On this new layer I have 5 boxes called beast box. each has a instance variable called box_id

    All my monsters have an instance variable called mob_id and are part of a family called mob_family. I also have an array for the monsters called array_monsters where I store the mob_id at position (0,1) for each monster. (3 monsters so far so 3 arrays are created)

    What I want to happen is check each monster box id and match it to the correct monsters array.at(0,1) and spawn the appropriate monster in the box. (Box ids start at 0,1,2,3,...) (Monster ids start at 0,1,2,3,...) as well So If box id = 0 & mob_id = 0 spawn a badguy in first square, etc.

    What happens now is I press 'B' My layer shows up, and the first 3 boxes get populated with random monsters from the family instead of my intended order of 0,1,2 (bad guy, slime, goblin)

  • I was wondering if the following is possible.

    I have an array called mob_array

    It has 3 instance variables, mob_id, name, hp

    I also have a family called mob_family

    It also has 3 instance variables, mob_id, name, hp

    I then created 3 monsters within the family and gave them all different values

    monster 1: mob_id = 1, name = bad guy, hp = 5

    monster 2: mob_id = 2 name = slime, hp = 10

    monster 3: mob_id = 3 name = goblin, hp = 15

    Each member is a sprite with its own animations.

    Any idea how I can store each mob into my array properly?

    I followed the tutorial for setting up a basic experience system using an array at: https://www.scirra.com/tutorials/720/st ... nce-system and have modified it to keep all my hero stats in one table. But when it comes to adding monsters to a new array like this I dont know where to start.

    Thanks

  • Everything is working as intended thanks everyone.

  • still having trouble setting this up.

  • I could but it does not solve my issue.

  • Hello everyone!

    I have been playing around with health bars and recently started using families. The family is called Mob_Family.

    That family has two variables. (mob_health) and (mob_maxhealth)I am having trouble with damaging foes.

    I have 4 statically placed mobs. Each mob has a different value for mob_health.

    When I test play, All 4 mobs get a health bar above them but when I strike the first mob, all 4 mobs take damage and every health bar updates as a result. And the enemy with the lowest hp will be destroyed even if i don't hit him. I don't know what I can do to fix this issue. Any suggestions? Thanks

    PS: I was hoping to avoid using containers

  • I have a side scrolling game which has a hero on screen which moves left or right based on X position of touch.x vs hero.x

    The issue I have is the player only moves when touch is active. I would like to touch once and move to destination without using pathfinding. Any suggestions?

  • Thank you. instance variables is what was needed.

  • I have 2 layouts or maps.

    On layout 1 (home) I have a sprite who walks left and right. When he leaves the edge of the screen, the layout changes to layout 2 (world map)

    I was going to make several points of interest on the world map so when you leave an area, the sprite on the world map gets positioned near the point of interest. The issue i am having is changing the position of the world map sprite to where I want.

    So if you leave your home the sprite on the map should be near the home icon, if you leave the forest, the sprite should spawn near the forest icon. Any ideas??

    Also I am using 1 event sheet for both layouts.

  • Thank you for the feedback. I have updated the game, please let me know what you think.

  • Little game i was working on for mobile. check it out, need feedback please

    http://www.scirra.com/arcade/addicting- ... 9/coinrain

  • OddConfection

    That did it, thanks for the fast reply!

  • I have a coin sprite which has multiple frames. Each frame is a different looking coin. The coin also has a instance variable to track value. Every 2 seconds I call the function itemspawn listed below.

    (Coppercoin=1, silvercoin=2, goldcoin=3 etc..)

    At the moment I have the coin spawning, and it changes to a random frame. When I collect the coin I get the correct value. The problem is ALL COINS update frame when a new coin is generated.

    So if a gold coin spawns it will start to fall from the top of the screen, if a new coin spawns before I can get to it, the gold coin may change into a copper coin. this repeats every time a new coin sprite spawns for all coin sprite objects on screen. Any ideas on how to fix this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Magistross The first method you described worked perfectly for me. Thank you.