ome6a1717's Recent Forum Activity

  • This works great, but how would I move the enemy based on the player's position? (so if you hit the enemy from the 45 degree angle, he goes the opposite direction of you)

    Thanks, Vee!

  • That's a good idea. I tried doing a loop (Repeat 20 times) > move -5 pixels, but it doesn't seem to move the enemy.

    The event is a sub-event under Else Enemies X Is Overlapping IceBlock. Any idea why this wont work?

    Thanks, Ram!

  • Here is part of the code. When the enemy is hit, it moves back based on the direction the player is moving/attacking.

    <img src="http://stevemazzaro.com/OM6A/Collision.png" border="0" />

    This works fine, but if a large environment obstacle (such as a rock, hill, or something that should create a boundary for the enemies/player) is behind the enemy when he is hit, he is shot into the object with no way of getting out.

    Let me know if this is more clear.

    Steve

  • I'm running into gameplay mechanics that require me to design my own collision events - mainly when you hit an enemy and he gets knocked back, regardless of the collision set for the object, the enemy will be knocked INTO the object if the collision box is big enough.

    What is the best way to fix the code for something like this? I've tried setting "if enemy is overlapping bigcollisionobject, when knocked back 100 pixels, move 100 pixels in the opposite direction". But it doesn't happen instantaneously, and looks very noticeable.

    Does anyone have any solutions or ideas for this?

    Thanks!

  • You guys are amazing - thank you!

  • I'm trying to use it like this:

    On Sprite1 Destroyed

    For Each Sprite1

    Pick Sprite2 Instance with UID "Sprite2.Pin.PinUID"

    -Destroy Sprite2

    It doesn't seem to be working. What am I doing wrong?

  • During the course of my game, I will have plenty of sprites being spawned on top of other sprites (ie. if you set an enemy on fire, spawn fire sprite. if an enemy detects you, spawn ! sprite). Normally when I destroy a sprite, I can use a "On Sprite1 destroyed - if sprite1 is overlapping sprite2, destroy sprite2" and it works. But what do I do if sometimes multiple instances of Sprite1 will be overlapping each other (which is always a random occurrence)?

    All of the sprites I spawn are pinned 99% of the time. Is there an event to check if an item is pinned to another object? (if I use Sprite2 is Pinned, it destroys ALL of them in the layout)

  • Ah perfect - thank you :)

  • Quick question - is there a way to use the distance expression with ONLY x or y?

    ie. If (distance(Sprite1.X, Sprite2.X) < 300 and If (distance(Sprite1.Y, Sprite2.Y < 900)

    Thanks

    Steve

  • Hmmm...when I do that, if there are 2 badguys on screen, one of them spams the Startle sprite even more. I tried adding a "BadGuy is on-screen" event, but that didn't seem to do anything.

  • This is the code I'm currently using.

    <img src="http://stevemazzaro.com/triggeronce.png" border="0" />

    The code works perfectly until you get to the final enemy instance on the layout. The last enemy starts spamming the Startle sprite every time you hit it with your sword.

    The sword collision event sets the EnemyAlert to 1 and includes all of the EnemyLOS actions you see above, but why would it work for all the other bad guys, and not the last one?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Perfect - thanks for all the responses. I ended up using RamPack's. I tried disabling the group, but for some reason it still didn't seem to work.

ome6a1717's avatar

ome6a1717

Member since 12 Feb, 2013

Twitter
ome6a1717 has 3 followers

Trophy Case

  • 11-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies