Object relative spawn point

0 favourites
  • 6 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Is it possible to have an image point for an object that's dependent on instance variables? I'm trying to create an enemy that spawns an object (a bomb), but i want the object to spawn a relative distance away from the enemy (so the same type of enemy will teleport bombs around the player based on its colour).

    I've set the enemy object with its instance variable. In the event sheet I've set the enemy object to spawn the bomb object but i can't see what to set as the Imagepoint. I was hoping to do something like Imagepoint = enemy + enemy.spawnedObjectX but i can't seem to get anything working.

    I'm not sure if that's the way to go about it since there seems to be no way to take into account positioning. Can anyone help at all?

    Thanks in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ,,,,,,,,,,,,,

  • Thanks Korbaach. That's kind of what i had, but how is the instance variable determining the spawn object's location? I'd like the spawned object to spawn along the x axis of the enemy but the instance at various distances. So far all instance variables seem to spawn the object at either each of the cardinal points or in the centre.

  • if something ..set Var_ImagePoint =1...................... enemy will spawn bomb on image point 1

    if something2..set Var_ImagePoint =2...................... enemy will spawn bomb on image point 2

    if something3..set Var_ImagePoint =3...................... enemy will spawn bomb on image point 3

  • Ah, didn't realise that Var_ImagePoint directly controlled the Image Points of a sprite. I understand now.

    That's perfect. Thank you.

  • ..no problem..

    just set image point to Var_ImagePoint...

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