dop2000's Recent Forum Activity

  • oosyrag Yeah, I thought about that, but I tested the same events in the same order and the Timer worked as expected for me.

  • Patrolling with pathfinding:

    dropbox.com/s/nglwbuzmdjpd7os/PatrollingEnemy2.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The same code works fine for me. Are there multiple instances of Disparo sprite? Or maybe it gets destroyed while the timer is running. Or some other events are interfering. If this doesn't help, consider posting your project file.

  • Give a name to the timer, don't leave it empty "".

  • You should try removing all external plugins from the project before posting it here. Or post a screenshot of the code.

  • EDIT: one important note is that, obviously, if the patrol is turning 5 degrees (or -5 degrees) per tick, then you have to make sure the angle of the trigger is a multiple of 5 - otherwise the angle of the patrol will never match up with the angle of the trigger and it will just spin around on the trigger forever...

    I suggest using "Rotate towards" action, it will rotate the sprite correctly. Say, if the difference between angles is 3 degrees, "Rotate 10 degrees towards angle" will rotate the sprite by only 3 degrees.

    Another way to do this is with Pathfinding behavior - for each enemy find path to the next patrol point. Pathfinding will take care of sprite rotation, acceleration/deceleration etc.

  • Probably the easiest solution would be to remove that "Set angle" action and add another event:

    On every tick: Enemies rotate 5 degrees towards Enemies.Bullet.AngleOfMotion
    

    In Russian: "На каждый тик: Enemies повернуть на 5 градусов к Enemies.Пуля.УголДвижения", что-то в этом роде :)

  • Another option is to do this with a couple of variables.

    Mouse On sprite clicked
    ....Set variable lastClick to time
    ....Set variable clickedUID to Sprite.UID
    
    Mouse On left button released
    Mouse Cursor is over Sprite
    Sprite pick by unique ID = clickedUID
    Compare variable lastClick<(time-1)
    ....Sprite destroy
    
  • Is this is a top-down game? What behavior are you using for the character and NPC movement? With Bullet, you can use "Bounce off car" action instead of making the car solid. With other behaviors it may be trickier. One option is to temporary disable collisions for the character for the duration of the jump.

    Also, instead of that bunch of "Set scale" and "Wait" actions I recommend using Sine or LiteTween behavior. It will look much nicer and you can use LiteTween's events like "On tween end" to detect when the jump has ended.

  • What you described should work, maybe you did something wrong. See this example:

    dropbox.com/s/b7k3gbkzdf08bnk/RotateDemo2.capx

  • ... or floor(random(1,6)) or int(random(5)+1)

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 260 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies