MrClifford's Forum Posts

  • Problem solved using player.physics.velocityX and putting in event in the correct place!

  • Hello,

    Project i'm currently working on uses velocity to move the player around. I would like the projectiles of a turret to follow the player like in Ashley's turret tutorial - the current formula is:

    bullet.speed+player.8Direction.Speed/2+distance(self.X,self.Y,player.X,player.y)+100*dt

    As my player does not use 8Direction this formula does not work. I'm unsure what the best way to convert it is - I have been playing around with changing the 8Direction.Speed to different Velocity params but to no avail. I have also tried to compare 8Direction to Velocity and vice versa but the math is a little past my level of experience.

    Any advice would be much appreciated.

  • Got it sorted, got the system to create new button, works perfectly. Thanks for your help dop

  • Its destroying the animated sprite! Hurray! However, the spawn new object (healthbutton) is spawning for a brief second then disappearing

  • To be honest I didnt even realise I was using a sub event there, I've been using my phone to do the alterations today. Just had a quick look and can now see the on timer event (as it's on a new top level event) so I'll have another play around. Cheers dop

  • Dop, thanks for your reply again bud. Thanks for the pointers and yes I now see how I was telling the whole system to wait 10 seconds. After following your advise, and going over the manual countless times I am still stuck! All I can get it to do is to destroy the health button, spawn the animated sprite, the countdown lands at 1 and.. nothing. Numerous attempts, I'm obviously missing something!

    No matter which was I do it, I cant get that animated sprite to spawn the health button again or destroy itself. I'll send some snippets that I've been trying (I've tried about 60 variations so far) but still cant get it to work, and not sure how I can do animated Sprite on animation finished as an event, unless inverting which as you'll see I've tried.

    Also tried with a variables instead but came across some bumps there!

  • Hello, just having a little change in the way my game runs and would like a button that can currently be touched over and over again to only be able to be touched again after X seconds. For testing purposes I have made a Sprite counting down from 10-1 every second.

    The problem I'm facing is that the first part works - the initial button gets destroyed and replaced with the counting down sprite. However, I cannot get the original button to respawn or destroy the counting down sprite. I have sat here for an hour experimenting but just cant get it to work.

    Any pointers or am I looking in the wrong ball park? The initial Wait 0.3 to destroy the healthboostbutton is there just incase touch is prolonged on the button causing unwanted character movement. Cheers

  • Fixed the loop.

    0 life was causing the call function "gameover" to repeat constantly. Added 1 to life after and problem solved. This an ok way of doing it or a bit of a bodge job?

  • Managed to find the fix.. its because i was working on Windows. I have been doing most of the development on Chromebook and phone, and C3 recognises Chromebooks as touch, hence why the buttons were working on that and not on Windows. However, still have the game over audio loop to fix, if i cant find the solution i'll email you. Cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Dop, could I share my capx with you for you to see? I was just trying to add a teleport to sprite based on one of your other threads and when I came to test all the two buttons (i tried to family them) stopped working. I then removed all the events i had just made and still the same issue, healthboostbutton not working, and now getting a sound loop issue on game over screen.

    Even tried to remake on a fresh capx and getting same end result for some reason! It was working before 😭

  • Thanks dop - I forgot about other touching conditions so adding it to the first event didn't work. I have added the is not in touch to the other events using touch and it seems to have worked! I may not need one or two of them, could you just check this screen shot? Cheers again.

  • The game does not use any other buttons, heres a screen of the current touch events which can be touched anywhere on screen

  • Hi guys,

    Been a long while since the last time I used Construct (there's now Construct 3!) and I am trying a new project.

    The game uses the "Is in touch" event to move and throw the character around the screen. Now, I have just added a life system and would like players to be able to touch a button on the HUD that can be touched once per level to regain some health. I have all the functions for this working however, due to the "Is in touch" already being used Construct sees this button being pressed as a previous event, flinging the character willy-nilly.

    Is there a way I can disable the original touch input when either that section of the screen or the sprite used is pressed?

    Thanks

  • I like this, new take on endless runners, beast mode is cool, and an overall nice mobile gaming expiranc . Those high scores are sexy too

  • Sounds good, but would be looking for sprites moving in from the sides too. I guess a bit like fruit ninja. Thanks for your help though ill get cracking with the above and try and add to it