SimoneT's Recent Forum Activity

  • neoflash1979

    There are many ways to go about this.

    You should add an instance variable for your sprites appearance: ex. Enemy.Skin.

    Now when you spawn your Enemy, add the action: set value of Enemy.Skin to choose("blue", "red", "green"....)

    If you plan on increasing the number of appearances, you might consider storing that info on an array and calling it by: set value of Enemy.Skin to SkinArray.At(ceil(random(0, (SkinArray.Width)))-1)

    Name your animations according to the skin names you might choose ex.: "blue", "red", "green"...

    Don't forget to call your Enemy's animation in the spawning process:

    Set animation to Enemy.Skin

    Does your enemy sprite need more than one animation to run? If so:

    Change your animation names from "Running", "Shooting", etc to "BlueRunning", "RedRunning", RedShooting"

    Set the animation to Enemy.Skin&Enemy.Action (Assuming Enemy.Action is the instance variable that dictates your sprites action states).

    Of course, if your sprite does not animate (has only one frame) you can just add difference frames, set animation speed to 0 and randomly choose a frame to be set to.

    I hope this helps!

  • KHC

    I made a few mods to my capx to allow you to change decks within one layout.

    You will note that the animation are sorted by DeckLetters, and I have created an array to store my 3 different decks. The last frame of each deck is the CardBack. Since my game has a 16 card tableau and I didn't want to change to much of my code, I call on the gNumberCards frame, since animation frames are 0 based.

    At the end of a deck, I add 1 to DeckLetters and mod(%) it to the width of my Array so that when DeckLetters goes higher than the number of Decks in my Array, it goes back to 0 and start back again. (I might have forgotten to set the width of my array to 3, so make sure to change that).

    If you need more help, don't be shy, you can PM me!

    https://www.dropbox.com/s/7oyuzoqonumm8 ... .capx?dl=0

  • KHC

    I took Kittiwans' completed tutorial capx for the Memory Match Game and made a few modifications. Check it out and see if this is what you are trying to do!

    https://www.dropbox.com/s/tj72i5ry9or8l ... .capx?dl=0

  • Hi there,

    Without more details about the mechanics of your game (is it a top-down game, platformer or other?), I would suggest you add the LineOfSight behavior to your enemy sprite. Adjust the pixel range in the properties menu and add this event:

    If Enemy has LOS to Player =>

    (Sub-event) Every X seconds => create bullet; set bullet speed, angle and so forth...

    Hope this helps!

  • Ok, I'll try to make it clearer

    I see that you plan on having each word card have a matching letter card to pair with. In that case, you should probably add two instance variables to your cards:

    1. CardType(text): "Letter" or "Word"

    2. CardLetter(text): "A" or "B" etc...

    Then, to check if the cards match:

    Event: If Card1.CardLetter and Card2.CardLetter are the same

    sub-event: Card1.CardType is not the same as Card2.CardType, then match

    Else, no match.

    Let me know if this makes sense!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Kerri,

    I have a way, I think. Do you plan on having the same ratio of children to parent cards throughout? (or "letter" to "word"). If so, this could work.

    Say that frame 0 is the CardBack, LetterCardA is frame1, WordCardA1 is frame2, WordCardA2 is frame3, WordCardA3 is 4 and WordCard4 is 5, and assuming you have the same amount of "WordCards" for each letter, you can match cards by their multiple of 5 (1 letter card + 4 word cards).

    Ok now if you ask if ceil(Card1.AnimationFrame/5) == ceil(Card4.AnimationFrame/5)

    *you can change the "5" with a global variable in case you plan on changing the number of children cards...

    Let me know if this makes sense to you!

  • Hi there,

    Try to copy/paste your event, right click on the "is overlapping" condition and click on "invert". This will change your condition to "is not overlapping". Change the action at the end of your event and it should do the trick. "invert" works for almost all event conditions.

    Hope this helps!

  • Hi, did you read the chapter on "Performance Tips" and "Memory Usage"?

    https://www.scirra.com/manual/134/performance-tips

    https://www.scirra.com/manual/183/memory-usage

    There are lots of tips on making your game more efficient.

  • You should read this tutorial:

    https://www.scirra.com/tutorials/308/cl ... ics-pacman

    I'm pretty sure it covers what you are trying to accomplish.

  • I'm not sure what you are trying to do, but you should check out this tutorial for grid-based movement:

    https://www.scirra.com/tutorials/308/cl ... man/page-2

  • % is the modulus operator, mod on your calculator. It divides the number by the second and returns the remainder.

    5 % 2 = 1

    If you count your time in seconds and you have 5624 seconds, you can find how many minutes there are by doing floor(5624/60) and how many seconds by doing 5624%60.

    It is VERY useful when calculating angle of direction, time, currency... anything that loops back to zero.

  • Create a start and stop timer event so the timer only runs when the player is running the game (e.g., is not in the main menu or in pause mode). Include the timer variable into your save game slot name.

    Check this tutorial out:

    https://www.scirra.com/tutorials/173/time-counter

    That should do it!

SimoneT's avatar

SimoneT

Member since 25 Jun, 2014

None one is following SimoneT yet!

Trophy Case

  • 10-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

12/44
How to earn trophies