oosyrag's Recent Forum Activity

  • Are you able to display (or view in debug) ajax.lastdata by itself if you write it to a variable or text object directly?

    Are your text object dimensions large enough to fit all the content you are attempting to display?

  • -> bulletobject: Set Bullet angle of motion to angle(bulletobject.X,bulletobject.Y,Sprite.X,Sprite.Y) degrees

  • This will be hard to diagnose without seeing your event sheet... Is your event to set the player to rotate towards the specified position in a common group of events for both peer and host? Can you confirm if the specified position instance variables are synced/set properly on the peer side?

  • It is a possibility to have multiple instances of a single array object, which you will then be able to pick by comparing instance variables, nth instance, or uid. This may not suitable for all applications though.

  • Things to check include making sure the cone object isn't synced and that you're picking conditions for the cone are working as intended.

  • Here's an example, there were a few things I missed like picking all enemies again after colliding with one of them (normally only the one that triggered the collision is picked. We want to pick all so that we can randomly pick a new target after that.

    I used the enemy's UID to store as a target for a bullet.

    dropbox.com/s/7n3u84okx4ifeej/homingbullets.c3p

  • If you want homing bullets, you'll need to set a target for it, and then set the bullet angle of motion towards that target every tick.

    You'll also want some additional instance variables, so that each bullet can "remember" what it's target was.

    Or projecting the trajectory of the target is also an option, but that can get even more messy.

  • After narrowing down a target by picking, you can use the action set angle of motion to angle(bullet.x,bullet.y,family.x,family.y), where bullet is the bullet's current location, and family is the x and y of the picked object. The angle() expression gives the angle between the two.

    You can also narrow down the targets by using the "Is on screen" condition before picking a random instance. Note the order is important, conditions filter in order. So if you used pick random instance, and it picked something off screen, and then had "is on screen" afterwards, you would end up with nothing picked.

  • I haven't tried it, but it may have to do with how the multiplayer object updates the position of synced objects. Have you tried just setting the cone's position to player.x/y every tick instead of using the pin behavior?

    Is having clientside objects that only exist for the peer even possible?

    Yes

  • If you have 4 separate sprite objects as "enemies", you would normally put them all into a "enemies" family, and then you can use the system - pick random instance to get a random one. That way you don't have to repeat your events for each enemy object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Firstly you will need to keep track if any given bullet can bounce, or if it should destroy itself. You can do this with an instance variable on the bullet object. Lets call it bounce, and set it to 1 by default.

    On collision with target, add some sub events. You can compare instance variables. If bullet.bounce is 0, destroy bullet. If bullet.bounce is > 0, subtract 1 from bounce, pick a new target based on your conditions, and set bullet angle of motion to angle(bullet.x,bullet.y,target.x,target.y).

  • Add an event: On Start of Layout - Destroy bullet

    Or better yet, add the destroy outside layout behavior to the bullet, and place the first one in the margin outside the layout in your layout editor.

    I recommend following the Beginners Guide to Construct

oosyrag's avatar

oosyrag

Online Now

Member since 20 Feb, 2013
Last online 18 Jul, 2025

Twitter
oosyrag has 39 followers

Trophy Case

  • 12-Year Club
  • 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
  • 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
  • Email Verified

Progress

22/44
How to earn trophies