adamebastin's Recent Forum Activity

  • Okay so I hope there is a way I can use the same object multiple times in a layout without having to create a clone.

    Let's take for example a platformer. The player shoots a bullet to a crate. I gave the crate an instance variable of 100 health. Each bullet takes away 25 health. After 4 times the crate is ready to be destroyed and explode.

    The way I have it coded (event / action):

    ...1 event & action - when bullet hits crate / it destroys the bullet and takes away 25 health.

    ...1 event & action - when the crates health reaches 0 / the crate is destroyed.

    ...1 event & action - on the create destroyed / the crate is destroyed. an audio is sounded. and an explosion animation is created.

    This works fine when I have one crate. However, if I simply copy the crate and move it to later in the platform it is already destroyed because of the first crate. Is there a way around this? Perhaps by adding a condition that the UID is X crate? That way it will only take away health from that crate? Although I doubt that will work.

    The only way I have found to have multiple crates is to just clone the crate and then make the same code for that crate. The problem here is that it takes up more space and memory to have those extra crates.

    What is odd is that I have several food items. I can use the same fruit many times in a layout without cloning it.

    I have it coded (event/action):

    1 event & action - when player collides with orange / orange is destroyed & audio is played.

    This however does not destroy all the oranges in the layout. Just the one the player touches. So in this case I do not need to clone the orange. I do not see the difference. I think I am missing something. Does it have to do with the instance variable? Should I give each create a unique instance variable? Any ideas?

  • Very interesting. I did just discover that it was the angle that I was referring to.

    Well the thing is I have a sprite that has animations like "move right" and "move left". So they look different depending on if they are moving left or moving right.

    I like your suggestion. What are the easiest methods to move an object in a direction ignoring its current angle?

    I was just going to use it for an enemy. It was going to move left once the player is in its LOS.

  • This may be a little hard to explain but I'll try my best.

    When you click on any object in the center there is a small box with a line connected to a white slightly larger box. My post has to do with the white slightly larger box.

    First of all, what is it called? What all can it do? From my understanding this is the direction that the sprite will move when given the bullet behavior.

    By default it is always pointed to the right. The only way I know to change this is to drag it and move it say 180 degrees so it is pointing to the left. The only problem with this is that I then have to change the animation of the sprite 180 degrees as well.

    It just seems like I am missing something or that there is a better way. Any suggestions?

  • Dynamic Quiz Generator — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-game-templates/dynamic-quiz-generator-2124

    <p>This is a quiz generator. Notice that the answers are in different order each time you time it. It can handle multiple choice, true or false, and yes or no type questions.</p>

    Use this topic to leave comments, ask questions and talk about Dynamic Quiz Generator

  • I want the text to be images because I don't want to have to worry about the user not having the font. What do you mean by knuth shuffle? Is that a plug-in? I agree I have too many duplicate a,b,c,d that I could cut out.

    What do you mean about adding images from the question text?

  • Hello all! First post here, hopefully I'll get some feedback.

    Here's the link to the .capx:

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

    Press the space bar to shoot notes to select answers.

    I made this quiz game about two years ago, when I was just starting out with C2. I think the methods I used were fairly simple, and I want to think of a better way to do it, and improve upon it. Do you think I should be using an array? If so, how? Probably should be using functions for some of it. Is there a complete different way of approaching this that would be much easier or more logical?

    I also want to figure out a way so that every time it runs, the answers aren't always in the same order. Right now the answers for any question will always be : a = answer1, b = answer2, c = answer3, d = answer4. I want to to have it so that it randomly decides where each answer goes. Not sure how to do that though. My logic was to have a global variable generate a random number 1 through 4. and then based on that number have the answers order in various ways. However I was not able to make a global variable a random number.

    Thanks for you thoughts!

    Adam

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Jungle Boogie- Advanced Template — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-game-templates/jungle-boogie-advanced-template-2035

    <p>Advanced Game Template built for those who want to learn the fundamentals of Construct 2. </p><p>Please check out the demo to see if this is for you!</p><p>This game template includes:</p>

    • 2 fully animated characters. This alone might be worth the price.
    • Fully commented and explained actions and events. Great for learning.
    • Coded to allow for the user to select which player to select.
    • Health Bar
    • Gain health by collecting food.
    • Snake AI - shoots poison at the player
    • Fade-In's on all layouts
    • Master Audio Controls

    Use this topic to leave comments, ask questions and talk about Jungle Boogie- Advanced Template

adamebastin's avatar

adamebastin

Member since 16 Jun, 2014

None one is following adamebastin yet!

Trophy Case

  • 10-Year Club
  • Popular Game One of your games has over 1,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies