Maako's Recent Forum Activity

  • When I run this in debug mode, the circle is created one tick before the square animation changes.

    I know it doesn't seem like a big deal but long story short it is causing problems in a game I'm working on.

    Anyone know what's going on or a way to work around it?

    Thanks

    Tagged:

  • Ah, that works, thanks. Exactly what I was looking for.

  • I wanted to check something from a post I made a while ago, but I can't seem to simply browse posts like I used to, it only shows comments, and those comments don't show the title of the post they are from, so I have to scroll and read through piles of comments to figure out which ones are from the post I want.

    And since the comments show up in order of recency, I'm also reading backwards, making it even more awkward.

    I wouldn't call myself a heavy user, but I have about 80 comments across 7 pages. It's not the end of the world or anything but it does feel a little cumbersome.

    I'm almost positive in the old forum you could browse by posts, would it be possible to bring that back?

  • I have a problem I'm trying to debug. The issue is that what I want to check happens almost immediately after inputting a command, and because of other interacting mechanics, it leaves a very tiny window in which I have to press the command and then click pause.

    It's not impossible but this isn't the first time I've struggled with this and it would just make life so much easier if I could somehow input a command while the game is paused.

    Can anybody help?

    Tagged:

  • That's because "On animation frame changed" is triggered separately per each enemy instance. And inside this event the enemy instance is picked, that's why the bullet is created by this instance.

    If you have an event "Enemy shoot variable =1", it picks all enemy instances with shoot=1, and if you want them all to create bullets, you either need to use "For each" or "Enemy Spawn.." action.

    .

    I don't like using state machines because you have to check lots of conditions on every tick. I prefer Timer behavior. Note, that "On Timer" event can pick multiple instances at once, if their timers expired in the same tick, so you still might need to add "For each"

    Ya you still have to use For Each. I originally ran into this issue because I had the enemies creating the bullet on their Timer behaviors, and if the Timers triggered on the same tick it would not create multiple bullets.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is that "System Create Bullet"?

    Yeah that's one of the quirks of picking.

    You could try shootvariable = myvariableid, shoot bullet, set shootvariable to 0 and set all the instances separately, but for each is the quickest method.

    Ya its System create.

    Another weird quirk, if the "Create Bullet" action is triggered by a "On Animation Finished" condition, it works fine, and will create a bullet at each sprite at the same time.

  • I have multiple copies of an object.

    I have a trigger that sets all their "shoot" variables to 1 at the same time.

    Then I have an event that says:

    If enemy "shoot" variable is 1

    --

    Create bullet

    Set shoot to 0

    It sets all their shoot variables to 0, but only creates a bullet on the first created enemy.

    I'm guessing the solution here is to use a for each loop, which is fine. I originally had it trigger on a timer, so I just have to add an extra step. No big deal.

    I am a little curious as to why this is, or if there's a way to do this without using a loop.

    I tested this with other actions (moving,rotating,destroying etc) and it seems to only happen with creating objects.

    Anybody know why this happens?

  • mekonbekon That works perfectly!

    Thanks so much for the help!

    I think I even understand how it works, that's really cool!

  • > [Sprite] Set Angle Toward (sprite.xend, sprite.yend)

    This will end up with the sprite always pointing towards the initial touch point.

    Instead, add two instance variables to the sprite, xLast and yLast, and whilst the sprite is moving use

    [Sprite] Set angle to(self.xLast,self.yLast,self.X,self.Y)

    [Sprite] Set xLast to self.X

    [Sprite] Set yLast to self.Y

    Hey thanks for the response,

    I tried what you wrote, and it's giving me a syntax error with the first comma when setting the angle.

    It says: "Expression appears to end before here, are you missing something?"

  • [Sprite] Set Angle Toward (sprite.xend, sprite.yend)

    Hey thanks for the response,

    This isn't quite what I meant. This way would make the sprite constantly look at it's target.

    What I wanted it to do would be to face in the direction that it's moving, so if it's moving up, it would face up, and so on.

    One way I was thinking would be to just do it manually, since the timing is fixed.

    But if you wanted to alter the flight time, it would be nice to just have a formula that corrected the rotation automatically.

    I'm guessing it would require some calculation with the flight time variable in order to get accurate rotation. "Rotate at (math related to flight time)" or something.

  • Resurrecting this post in hopes for a solution.

    Super grateful to R0J0hound for the original work.

    Does anyone know if there is a way to make the projectile's angle face the direction it's moving?

    Sorry if there is an easy solution but the math for this is pretty over my head.

    Thanks for any help

  • Hey thanks for the response, this appears to have fixed it.

    However there are times when I'm jumping around a lot on platforms and I swear I press the jump button and it just doesn't register.

    This happens even without my "PreJump" mechanic being turned on. I know sometimes I'm just pressing jump too soon before landing but other times I swear I see my walking animation before pressing it and it just doesn't register.

    Has anyone else experienced this? Am I just not timing it well enough?

Maako's avatar

Maako

Member since 14 Feb, 2015

None one is following Maako yet!

Trophy Case

  • 9-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies