kristithechocobo's Forum Posts

  • The hits variable must be instance variables of the enemy.

    then you can have an event like

    Bullet on collision with another object(enemy) > Enemy , add to 'Hits' 1

    -(subevent) Enemy.hits >= 2 , Enemy > Destroy

    The collision event already picks the instance that has collided, so if you destroy the enemy inside that event, it will already destroy the right instance.

    It works! Thank you!

  • Basically I already figured out the variables for this. ex. When Hits=2 destroy sprite.

    What I want to ask is how can I set it up so that way when I blast one of these sprites once it doesn't destroy another sprite of the same type when I hit that one for the first time?

  • I hope I'm not being rude jumping in like this but I do have a similar question regarding arrays and databases but with sprites while keeping the memory usage under check too.

  • codah: Don't worry I was able to figure it out, turned out it was just the angle of my sprites. A little rotating did the trick.

  • > codah: I'll give it a try. I'm using the Drag and Drop behaviors and I just restricted it to up and down I'll see if I can get the fireballs to spawn on release.

    >

    > Could you provide an image please? I'm kinda of a visual learner.

    >

    > : If I need more help I'll just post here so others can get help as well.

    >

    > Edit: I've managed to get the fireballs to spawn on release, but they are shooting up not to the left. Any suggestions?

    >

    > Edit2: Okay now I have the fireballs going horizontal but they're going behind the baby dragon and not to the left.

    >

    > Edit3: I figured it out just had to rotate my sprites a bit.

    >

    So, everything is working fine now?

    Took quite a bit of trial and error and a grilled cheese sandwich but yes I managed to figure it out.

  • codah: I'll give it a try. I'm using the Drag and Drop behaviors and I just restricted it to up and down I'll see if I can get the fireballs to spawn on release.

    Could you provide an image please? I'm kinda of a visual learner.

    : If I need more help I'll just post here so others can get help as well.

    Edit: I've managed to get the fireballs to spawn on release, but they are shooting up not to the left. Any suggestions?

    Edit2: Okay now I have the fireballs going horizontal but they're going behind the baby dragon and not to the left.

    Edit3: I figured it out just had to rotate my sprites a bit.

  • Another game I have in the works is where you're a baby dragon fending off knights from your cave and to do this you spit fireballs at them while not spitting fireballs at the prince or princess since they give you power-ups. you drag the baby dragon up and down the screen to line it up with tunnels where the knights, princes and princesses spawn.

    So my questions:

    Can I still use a drag and drop feature even if tapping the dragon will cause the fireballs to shoot out?

    how can I make the fire balls spawn in front of the dragon?

    thanks.

  • I'm trying to use the Array to generate random sprites for a sandwich making game where in the corner a random sandwich appears and you have to drag and drop the fillings to the bread in the correct order.

    can anyone help me?

    File Download: https://www.dropbox.com/s/qlc771k26gppf ... mple2.capx

  • No I don't.

  • let me redirect you to my other topic:

    basically my clock just froze at 4 seconds.

  • Okay it's working now. thanks.

    Edit: I've run into another problem...the clock is working okay but in a separate file where I've added the events for the sandwiches and fillings to appear, since I haven't figured out how to set it up so only one sandwich and it's repsective filling pattern appears one at a time the clock stops at 4 seconds. Is this because I have so many sprites on screen?

  • Thanks!

    Edit: Okay I've gotten most of my variables set up, and in the case of the timer starting automatically do I set the variables to constant?

    Edit Edit: Okay I just tried and that didn't work.

  • You will need to add variables one for minutes and one for seconds.

    Every tick

    --> add dt (delta-time) to seconds

    If seconds >= (is more or equal) 60 (because there are 60seconds in a minute)

    --> Add 1 to minutes

    --> Subtract 60 from seconds

    And just pack it all in, in a Timer running boolean or whatever you want to stop/start it.

    And if you want it in a text object do:

    Set text to Minutes&floor(Seconds)

    Could you make some images for this too please? I kinda get deer in headlights at text only.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In another game I'm working on I'm using a minute and second time, but instead of subtracting I need to add to it where it starts at 00:00 and ends at whenever you finish the game.

  • I'm working on a game where you're prompted to make a sandwich with an image of a random sandwich: in the example image a lettuce, meat tomato, and mustard sandwich.

    And I have a lot of questions on how to handle this and how to keep the memory manageable because with 16 fillings and 16 possible sandwiches I foresee a lot of events.

    In the game you have to correctly make 4 sandwiches from the ingredients shown.

    Okay here's the list of questions:

    1. How can I randomize the appearance of sandwiches?

    2. I want the sandwiches to vanish after five seconds then five seconds later reappear for 1-2 seconds and repeat.

    3. I want the ingredients to be placed (this is a drag and drop game) in a certain order how can I make the ingredient "return" to the tray if the player tries to add a correct ingredient but in the wrong order?

    4. How can I "shuffle" the fillings for each new sandwich?

    5. For the sandwiches how can I ensure that there's a different 4 sandwich combination each time the game is played?

    Thanks!