mekonbekon's Recent Forum Activity

  • Sorry, that's not entirely correct - you'll need to make another change:

    Events 4 -6 in your code should be under another main event:

    obj_player is playing "ID_SHOOTING"

    Adding the "trigger once" to Event 2 will prevent the ID_SHOOTING animation from triggering and resetting to normalAttackAnims every tick.

    Adding the new main event means that the code will only check the animation frames while ID_SHOOTING is playing.

  • Looking at the code from the first video, I think your problem may be that the event 2 "Is shooting" condition will trigger every tick until frame 3 is reached. Try adding a "Trigger once while true" to that event - you can combine them rather than making it a sub event but make sure it follows on from the "Is shooting" condition e.g.:

    Event 2: obj_player | Is shooting | trigger once whilst true

    Not:

    Event 2: obj_player | trigger once whilst true| Is shooting

    If you PM me the code I can confirm for you that this is the case.

  • imhotep22

    Cheers! Yes, definitely loads to do .

  • saravanakumar

    Sorry, wish I could help but I don't have any experience porting games to facebook - I hope you get a response though.

  • Is it that you want the bullet to spawn from the gun on the detonation frame (frame 1) rather than the 1st frame (frame 0)? If so, you could use something like this:

    1. On shoot key pressed | set playing sprite animation "shoot" from start.

    2 If sprite.animation "shoot" is playing, if sprite.animationFrame = 1 | spawn bullet from sprite at (gun origin).

    You will need to add an origin point at the position of the barrel of the gun on the sprite, where you want the bullet to spawn from.

    A word of warning about spawning the bullet partway through an animation: unless your animation is very quick and short (or you have a deliberately long wind-up phase for your shot) it is best to spawn the bullet at the first frame because otherwise you may be introducing a noticeable lag into the shooting mechanic, which can make the game feel unresponsive.

    If this isn't what you're after please could you link to specific video you're talking about, or include a capx?

  • Hi saravanakumar - you're best off opening up a new forum thread on the "How Do I..." board rather than commenting in this one - include a description of the problem, with a capx if possible, and you'll be more likely to get a useful response.

  • kiko2015

    I use this system for randomizing arrays:

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

    Event 2 just fills the array with stepped data - you can substitute this event for your array data.

  • Try Construct 3

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

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

    Yeah, it's amazing how much of a difference just adding a little bit of "juice" can make to a game.

  • Hi Youtopize,

    Sorry, I don't know of other ways to handle the 3D data that are compatible with C2.

    Using a JSON 3D array is probably your best bet (unless any kind souls on the forums have an alternative). It really doesn't take that much more time to enter data into a json than it would using a spreadsheet system and it also has the advantage that you can format the data with returns, tabs and spaces to make it more legible and suited to the type of data you're adding. If you want any help with the formatting I'll be glad to assist.

  • Sumyjkl

    That's useful, thanks. I'll look into it, got some ideas what's going on.

  • imhotep22

    Sorry, missed your post :S Thanks for positive feedback, I'm planning on making some upgrades to the game in the near future, lots of ideas swirling around!

  • Sumyjkl

    Oh no! Thanks for letting me know.

    It's a bit hard to tell from the image you posted exactly what happened; Is the screen grab you posted the whole screen and the HUD elements have shifted? Did the game lock up? Are the sprites not clearing? What inputs were you making at the time of the issue? Any extra info you can provide would really help me to fix the issue.

mekonbekon's avatar

mekonbekon

Early Adopter

Member since 9 May, 2014

Twitter
mekonbekon has 13 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

19/44
How to earn trophies