Triggering Spawn by X alignment problem

0 favourites
  • 2 posts
  • OK, here's what I'm trying to do. I'm trying to spawn an object (transparent targeting graphic) on an enemy fighter ship. The game is top down similiar to the "space blaster demo game". When the Player(palyerShip) is in direct X alignment with an enemy ship, I want the spawned image to appear. I tried the following:

    Enemy1 > (Compare X) > X=Player.X Event:Enemy1 Spawn Taregetting Graphic

    But nothing happens...

    Either I'm doing something wrong or there has to be another way.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well your Theory/Psuedo code is correct..It should work

    A few other things to check would be Z order Make sure that you are spawning the object on the right layout and that its visibility is properly set..

    Try spawning the object somewhere else first using the same code...and If it appears then its most likely just behind the Enemy1.sprite

    You can add a small code directly after the spawn that is

    Targeting Graphic->Move to top of layer

    try that...there could be a few other problems but that is what I would try first..

    its not the only way to check X though...

    you could also do something like

    Every Tick-> System(Compare two values)Player.X = Enemy1.X

    Action->spawn Targeting Graphic at Enemy1.(image point)

    hope that helps

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