jeffige's Forum Posts

  • I've been messing around with the physics behavior for some time and I can't get it to work correctly. It seems easy enough but I'm just not getting it.

    has started me on the path but I have veered off somewhere.

    Basically the player breaks a crate, a random fruit 'pops' out at random(225, 315), player picks it up.

    Right now, when the crate is broken the apple pops out but falls downward through solids and reappears at the top of the screen, only to fall again and disappear. I'm trying to get it to pop out and come to rest at ground level.

    I've tried changing every physics setting, apply impulse, force at angle, but it just isn't working.

    If anyone could help with this frustrating action it would be much appreciated.

    https://www.dropbox.com/s/d53jy5ac1sxrvr5/RUNGEON_XX-APPLE.capx?dl=0

  • Hey thanks Aleyba.

    I think you do. Basically, imagine if someone were inside a box and they tossed out an apple.

    I'm not too worried about the random angle as much as i am about it popping out away from the crate. Right now when the player breaks the crate an exploding animation plays as the apple is created in the spot of the crate.

    Two problems with this: 1) there is too much going on in that 48px area and 2) as soon as the player breaks the crate and the apple is created it disappears. You really don't even see it. I've tried 'pausing' the Apple Destroy but it looks/ plays weird.

    I'll give your method a try.

    Thanks again for the help.

  • When a crate is destroyed it creates the apple (and assorted fruit). I'd like the fruit to 'pop' out of the crate making the player go and pick it up.

    So i have to create the fruit at the crate and set the angle from the crate as well. I'm not sure exactly how to do this.

    So far I have

    On the create sprite 2 (crate.y, crate.x) action I'm missing something in the random(35, 40) expression.

    I tried = crate.Y(random(35, 40))

    I'm not exactly sure how to write the expression after crate.y, crate.x

  • I would like to have a collectible 'pop' out once a crate is broken. I've tried using the Crate--> Destroy-- Create Object & System Create Object --> but it only creates it at the Crates Origin.

    I know how to create Object at specific X & Y points and at a random angle, but not from a specific object (the crate) or at a random angle.

    I've tried System-->Create Object--> Apple--> crate.x crate.y but i'm missing something with the random angle expression.

    If anyone could help i'd be most thankful

  • Run and left/right are not animations, but controls (left and right makes the object with the behavior move, and jump makes it jump), animation control is separated from the behavior.

    Basically the platform behavior controls the logic, you have to control the graphics separately, the same thing happens also for putting a running or jumping animation.

    Yes, animations (run, jump) are controlled by a key press or a touch(up = jump, left/ right = corresponding movement but then why can't i have a down key press for a slide or duck? Why must it be different than a run or jump key press?

    All i'm saying is the option should be available. It could open more possibilities in game play.

  • Yes the DUCK is an animation, but isn't a RUN or JUMP an animation? It may be fine if the player is just a box. But most platformers use ANIMATIONS that correspond to a key press, and if you touch left/right an object moves left/right, and the corresponding animation plays that were added with KEYBOARD and PLAYERBOX ---> PLATFORM ON... events.

    It would omit an extra step needed to add an animation on a DOWN button press. Actually looking at it, i guess it won't actually omit a step, but it may be easier to figure out. It took me a few hours to figure it out.

    Maybe i'm not understanding correctly the way C2 is implemented , but that's the great thing about C2. It can do almost anything. You just have to spend hours trying to figure it out when there is no related info on the subject.

  • jeffige , what will this down option simulate? There is already a Fall through action for the jump-through objects.

    If the player has a DUCK animation, how would you add that? i.e: if an enemy throws an object at player and the player uses DUCK, a down option could work, right?

    This is how I currently have to do it.

    Instead of continuing with the simulate platform control.

  • In regards to Onscreen Controls, what is the best method for displaying and having them placed properly on different mobile screens?

    Using the ANCHOR method?

    Having a separate layout with only the controls?

  • A DOWN option under simulate platform controls.

    The option to change WINDOW BOX color. If there is a dark BG it makes it next to impossible to see.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey spacedoubt,

    Yeah, i got it figured out. Think of basic platform controls but in my game i have the slide animation, which is 'DOWN'. C2 doesn't have a DOWN control option. Before when i ran the layout, the player would act wonky.

    He would become horizontal, climb vertically as if he was climbing a wall, flip upside down and pin to the 'FLOOR'. It took me a bit of pacing but i finally got it.

  • I've followed the Detect Input Method example made by Ashley...

    https://www.scirra.com/tutorials/202/touch-controls-and-a-trick-to-detect-input-method

    But my mobile controls are different. I've tried adding instance variables and messing around with the events and actions but can't get it to work. I think i need to 'simulate key press' or something like that but can't figure out how to add that.

    Can anyone point me in the right direction (no pun intended)

    Thanks for any help.

    https://www.dropbox.com/s/atqhye3hukz0ddi/RUNGEON_XX-Controls.capx?dl=0

    (SOLVED)

    I have a DOWN key for a slide animation, which simulate control does not have an option for. I had to 'simulate control' with the playerbox for the other keys but for the DOWN touch i actually had to use the Player animation "slide" to get this to work properly.

  • Like in Mario?

    So there is a hero,

    he destroys the brick above him,

    and i.e. 4 elements of the brick are flying for 1-2 sec and then dissapears

    I don't want to use physics

    This is how an amateur did it using an animation sprite. It may not be the correct way, but it works for me.

    1) Open the image in an image editor

    2) Use the 'selection tool' to create copies of small pieces of the box--> paste them to a new blank canvas 2-3 times larger than the original.

    3)For each frame ( i only use 3) paste the pieces farther outward/downward/upward as you like.

    4) In C2 create a new sprite object--> import the 1st frame --> in the animation frames right click --> import frames from ( i use single files for this so i can go back and easily edit the frames if i need to)

    Make the speed of the 1st frame to your liking. I use 5-7, leave the others at 1.

    This is an example i pasted together of the animation for a block that must be jumped on to break.

    The block uses a instance variable for health event, but you may not need that.

  • I'm trying to add touch controls to my game. I have read Ashley's easy to follow tutorial, but in my game the player has a 'slide' animation when the DOWN key is pressed.

    In the event sheet - Touch --> Is Touching 'TouchDown' --> PlayerBox --> Simulate Control --

    The options only give me Right, Left & Jump.

    How can I simulate the 'Slide' control'? Is it possible?

    Thanks for any help.

  • Thanks so much hundredfold. I must have blew right past that.

  • Thank you once again, Xavier.

    I just finished with the instance variable and it worked great, going back over the ghost shooter tutorial and subtracting the health.