datiel12's Forum Posts

  • Ok, I understand better what you want.

    So you need to explain to the computer which animation to play for every possibility of movement. There are always many ways, but in my projects, and I am not some super expert, I am using angles to do that.

    To do this you need to picture in front of you the angles: 0 is on the right side, -90 is up and 90 is down and so on.

    So you need to setup several events to cover each range and you say:

    If the angle(Player.X,Player.Y,Mouse.X,Mouse,Y) is between 0 and -30

    If the angle(Player.X,Player.Y,Mouse.X,Mouse,Y) is between 0 and +30

    go right

    and set animation to "right"

    If the angle(Player.X,Player.Y,Mouse.X,Mouse,Y) is between 30 and 70

    go top right

    and set animation to "top right"

    If the angle(Player.X,Player.Y,Mouse.X,Mouse,Y) is between 70 and 110

    go up

    and set animation to "up"

    etc

    it will also help you to put a temporary text showing current angle on the screen so you can solve bugs around angle 0

    good luck

    Alright, I'll try it.

  • Hi,

    You mean something simple like SYSTEM Every Tick

    >> Player Set angle towards Mouse X Mouse Y?

    Similar, What i mean its when the mouse rotates around the sprite the sprite will change its animation direction. Something similar to the Alien Shooter Series.

    Actually a better comparison would be this

    The way the sprite animation changes based on the movement. Except I just want the effect but not for movement. I just want the effect for mouse look.

  • The title is messy. I dont know what to call it. But anyway how would I go about making a game with isometric sprites change facing direction depending on the mouse location. Similar to using rotate towards angle. But when its rotating, it will change sprites.

    Upon importing an .ogg file. Nothing happens, it just stays queued.

  • > Urled Re-upload please?

    >

    datiel12

    This thread is for the - now retired - Construct Classic section and is 4 years old, and Urled hasn't been on this forum for over 2 years.

    Are you certain you intended to post in this section?

    If yes, then you will have to hope someone still has an old backup somewhere and can provide the .cap.

    Oh, i didn't even look at the date!

  • Urled Re-upload please?

  • Hi datiel12, I also tried to do that some time ago, after some experimentation, I figured out how to do that with some arrays and a single weapon object type with several animations.

    You can find a full example of that buying my game template <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> (https://www.scirra.com/store/royalty-fr ... plate-2942).

    But I'll give you some tips here:

    • Have just one weapon object type. With its jj_Weapon behavior.
    • Make it have an animation for each weapon kind.
    • Have a bi-dimensional array with the statistics of all weapons. Where first axis is the weapon index and second axis are weapons values. Like this: |0:Animation|1:Shoot interval|2:Clip size|3:Stock size|4:Clip|5:Stock|6:Reload time 0 | Pistol | 300| 12| 128| 0| 0| 1800 1 | Magnum | 400| 6| 30| 0| 0| 4000 .... [/code:21kfaysc]
    • Have a second uni-dimensional array with the weapons the player has. It shall contain just the weapon indexes. It will be empty at the beginning.
    • Give the player a CurrentWeapon instance variable.
    • Have a function for each weapon type which sole purpose is to set the Bullet instance for the weapon.

    Those are the ingredients, I'll be giving the recipe in a next post (I have to go to my job now).

    Hope this help you point to the right direction <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    > Is there a tutorial on how to use this? Like an inventory System Or Something like

    >

    > (Top Down)

    >

    > I have 3 Weapons in game.

    >

    > The player starts out with one weapon. and then when the player collects the second weapon, the player can scroll between the 2 weapons. then the player picks up the third weapon and now the player can scroll between all 3.

    >

    > Anyway to do something like that with this plugin?

    >

    Hey, Thanks man! just wating for that second recipe of yours <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • Is there a tutorial on how to use this? Like an inventory System Or Something like

    (Top Down)

    I have 3 Weapons in game.

    The player starts out with one weapon. and then when the player collects the second weapon, the player can scroll between the 2 weapons. then the player picks up the third weapon and now the player can scroll between all 3.

    Anyway to do something like that with this plugin?

  • Nevermind! I took a look at my logic and Set the Else statement to Disable the Bullet.

  • datiel12 be more specific or tell as a example other game like. or paint it

    Heres a .capx https://www.dropbox.com/s/0oz0rxtjarz0a ... .capx?dl=0

    Since my game is a top-down game I want to have AI in it, Think Hotline Miami 2's Random AI.

    In Hotline Miami 2 the Random AI Walks around and When It sees the player proceeds to shoot. and when the player is killed or out of sight the AI either Sees the last position of the player Or Walks and Idles around.

    What I want in my game is for the AI to Randomly walk around the area and when it sees the player, He will shoot and when the player dies or is out of sight I want the AI to start walking and Idling again.

    So, I have a few Events setup

    The Bullet behavior allows the AI to move. So i have it disable when the AI detects the player while shooting. Otherwise the bullet will enable.

  • Could you please provide the .capx for your project? Thank you.

    Here, https://www.dropbox.com/s/0oz0rxtjarz0a ... .capx?dl=0

  • I want to have Types of AI, This AI I'm doing is Random AI, Whenever you Get in front of it or in its range it will shoot, when dead or out of range it goes back to walking and Idling. However I cannot get the AI to move whenever I have Target Enabled. Any Way to Bypass this?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure I'm savvy enough to answer your question. I did find this on the forums the other day. Maybe it can help, good luck!

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

    Hey! This worked Thanks!

  • What is 'Hitbox' exactly ?

    If the player pressed 'z' one time (or two) ... then pauzes for a while .. and like 30 seconds later presses 'z' again ....

    Which animation you would like to play then ?

    Not Really, I Know how to do that already. Whenever i press the Z Button even once it goes straight to the third animation (Which is a Kicking animation) and I Want it to basically cycle between all three. and when it gets to the third one its cycle will restart and when i press Z Again the 3 animations will play again.

    Also, the hitbox is for enemy collision detection. When i Press Z the Hitbox will be created and when an enemy collides with it, it will take damage. and one the Attack animation ends then the hitbox will destroy itself.

  • Hi, I have a Problem i'm trying to correct.

    My Game is a 2d Style Beat Em Up Game.

    Im trying to add combos into the game.

    The Method im trying goes something like this

    Global Variable (Punches) = 0

    On Z Pressed - Set Animation to "Punch"

    Punches = 0

    Add 1 to Punches

    On Z Pressed - Set Animation to "Punch2"

    Punches = 1

    Add 1 to Punches

    On Z Pressed - Set Animation to "Punch3"

    Punches = 2

    On Punch3 Finished - Set Value of Punches to 0

    However, thats not working out.

    What i am trying to do is when the player presses Z 3 Times it will play different animations and when the 3rd animation ends it will restart and play the others when you press z again.

    Those are My Events

    Help?

    Thanks!