datiel12's Recent Forum Activity

  • What oosyrag said. I don't think you need an array for a simple 3 weapon - weapon switch in my newbie opinion. I would use (and have used) variables to switch between weapons.

    I think this tutorial might help you build your weapon switch system. Think of switching weapons as switching between different states.

    https://www.scirra.com/tutorials/158/ve ... two-states

    This might be relevant too though I haven't seen the entire 2 parts.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You probably want some instance variables on your player to keep track of what guns they have. Then add a condition, only allow switching to that weapon if the weapon is acquired.

    If i do that, will i have to get rid of my array? I like how my weapon Switching system works there.

  • I'm trying to make a top down game in which the player starts unarmed and picks up a gun. and i want it to be able to cycle back and fourth. and so when ever he picks up another gun you will be able to cycle between all 3. How would i go about doing that?

    Example.

    There are 3 Weapons in the game

    You start with a Weapon ID Of 0

    Then You Pickup a Weapon with the ID of 1 Then you are only able to cycle between those 2

    Until

    You Pickup a 3rd weapon. Then You Will be able to cycle through all 3 weapons.

    You could say use an array. i already have one but if i cycle through it will give me all weapons.

    Thanks!

  • I thought the bullet would bounce in the right direction.

    try use ..on collision, bounce off object. it might work

    otherwize you could try set bullet angle to same as cars direction of motion.

    set bullet angle of motion to: Sprite.Car.MovingAngle

    I fixed it! i was playing around with the events and actions and did

    Car On Collision with testphys > Set Bullet Bullet Speed to 450

    Set Bullet angle of motion to Car.Angle Degrees

    Thanks for all your help!

  • > You could make the carbage cans use bullet behaviour instead. On collision you have them shoot away on impact in the direction you want. Set speed 0, set bounce off targets to yes, no gravity. and set acceleration to -2000 or something. On colission you set the speed of the bullet to same speed as the car+a bit extra.

    >

    > I think it could work something like that.

    >

    Alright, I'll test that!

    Cool! its Pretty Close to What i wanted! Thanks to both of you guys!

    Just one problem. It only has an impulse from one direction. How do i get it to have impulse from where ever the car hit the object?

  • You could make the carbage cans use bullet behaviour instead. On collision you have them shoot away on impact in the direction you want. Set speed 0, set bounce off targets to yes, no gravity. and set acceleration to -2000 or something. On colission you set the speed of the bullet to same speed as the car+a bit extra.

    I think it could work something like that.

    Alright, I'll test that!

  • I believe you'll want to increase the linear damping property of the physics behavior.

    It Just Sinks to the bottom of the game...

  • I believe you'll want to increase the linear damping property of the physics behavior.

    Thanks! I'll Try that!

  • Hi, i'm trying to make a GTA-Hotline Miami Open World Game and I Need Top-Down Physics. Sort of Like

    I Crash into garbage cans with my car. I want those garbage cans to slide on the ground and stop. I have something like it already with setting the physics gravity to 0 But that makes the Garbage Cans move Forever. Same thing with dead bodies.

    I want something like this

    https://gyazo.com/312272cdf0172d3ef3247375345b9740

    Help?

    Thanks!

datiel12's avatar

datiel12

Member since 14 Jun, 2016

Twitter
datiel12 has 1 followers

Trophy Case

  • 8-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies