How do I change Bullet "set angle" in game?

0 favourites
  • 4 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Is there an action to change an object's Bullet "set angle" option during the game? If there isn't, Ashley please add it!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Danwood are you trying to change the angle then shoot or shoot a projectile and then control it's movement? Or maybe shoot towards your mouse cursor at the correct angle? I'll see if I can help you troubleshoot just let me know what your going for.

  • Hi Danwood are you trying to change the angle then shoot or shoot a projectile and then control it's movement? Or maybe shoot towards your mouse cursor at the correct angle? I'll see if I can help you troubleshoot just let me know what your going for.

    Hi Rebel, thank you for your help! I'm trying to change the "Set angle" option for the bullet behaviur in-game.

    In my game, there are agents that move using the Bullet behaviur, and using the "Set angle" option automatically syncronizes their angle with their angle of motion, but there is a specific event where i need them not to do that (because they need to move backwards). I know i could simply disable the "Set angle" option and use an event every tick that keeps their angle and ang. of motion in sync, but I was wondering if there was a way to keep that option and just "uncheck" it during the game for a while, for convenience.

  • Is it possible to use a global variable something like AgentAngle as a sort of toggle? So for instance if AgentAngle=1 set the angle to angle of motion and if AgentAngle=0 I believe set angle to 0? I think that sets the angle back to it's default angle. Basically that's what the check box seems to do is on created set angle of image to angle of motion, but that's just it's initial behavior from there you can override it with this toggle and when they move backwards just include set AgentAngle to 0 then go back to set AgentAngle to 1 when they move forward again. Sounds messy I know but it's just a global variable and 2 events (if AgentAngle=1 do this and if AgentAngle=0 do that) then telling it when you need it to do each command. The global variable acts as your check box. I hope this helps in some way. If possible add a screenshot or example of what you're working with. Change the sprites or create a duplicate dummy example.

    **Sidenote** If you have them moving towards the player and you want them to always face the player even when moving backwards uncheck the set angle box and try every tick set angle toward position Player.x Player.y

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)