akarisilverleaf's Forum Posts

  • 7 posts
  • So I tried this -

    and i get this error when the player that created it (the one that I want it to ignore) is the closest target.

    Is this a bug? The Turret behavior specifically says "Unacquire target

    Tell the turret to forget its existing target, even if it is in range. This frees it up to target a different object, but it may choose to immediately target the same object again unless the Acquire target action is used immediately afterwards.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • All of the players are an instance of the player object. I only see a way to set a turrets target to a specific object, and no way to filter instances.

    I've done something similar to what you've suggested Aelxtro but it's not truly skipping the player who created it its simply acquiring and unacquiring the player that created it when its the closest player object. But is there a way to have it ignore an object instance entirely?

    Thanks

  • Hello All,

    I have a 4 player game - players can each summon turrets.

    These turrets of course have the turret behavior and on created have "ADD TURRET TARGET > PLAYER"

    Turrets have the target mode set to nearest

    Turrets have an instance variable that stores the UID of the player that created them.

    I don't want turrets to target the player that created them. So I have an event -

    Turret > on Turret Target acquired - set Target to "self.turret.TargetUID"

    - Turret.Target = Turret.CreatorUID > Turret - Unacquire Turret Target.

    What I run into is that when the player that created the turret is the nearest Player instance the Turret does nothing. As soon as the player that created it moves out of range it will properly acquire another player and fire. But as soon as its creator becomes the nearest target it once again does nothing.

    I guess to simply my question: Is there any way to tell a turret to ignore specific instances of its given target object?

    Thanks!

  • dl.dropboxusercontent.com/u/61682934/testing.capx

    Link to capx above.

    Click the brown box closest to you, it hits you. Click the original one that is slightly farther away and it passes through.

  • Hi all,

    I'm just playing around with Construct 2 and have run into a snag.

    I have a hitbox sprite (platform) and a box sprite (solid and platform). When I left click the box sprite the sprite sets its gravity to 0 and floats around and follows the mouse. When it collides with the player's hitbox it sets its collision to disabled so that it can pass through the player. When its over 100 pixels away it re-enables collision. No the perfect way of allowing one object to pass through the player when its click but its the only way I could figure out to do it.

    Here is the issue - on my Layout, I control click and drag to create a second block object. The new block, on collision does not deactivate collision. The original block does work properly. And if I click the second block and then collide the hitbox with the original the second block will pass through properly.

    I assume the collision command is only checking for collision with the original block and not the one I have clicked. How do I only get it to check the instance I have clicked for collision rather than the original?

  • Bump. Any thoughts or suggestions on this anyone?

  • Just looking for suggestions here. I am building a game where the main object will be bounced back and forth between players/ platform characters trying to hit each other. Sort of like a contact Tennis if you will. My questions is - Would you recommend using physics for the ball and the "swipe/swing/different attacks" that will bounce the ball back or would you say use solid objects?

    I'm currently using solid objects and the "Bounce off objects" option for the ball. When you "attack" it plays the attack animation and spawns an arcing "swipe" in front of your character that hits the ball and sends it in the other direction. But its not always accurate as to where it hits the ball as it is sometimes inside the swipe object and does some odd things. Or you hit the ball with the back of the swipe object and its sends the ball right into you.

    Is there a smarter way to do the collisions? Would Physics make it more realistic/ work better?

    Thanks for your help!

  • 7 posts