problems with pinning.

0 favourites
  • 4 posts
  • Still kind of a beginner here, so forgive the noob question. I am having problems pinning objects in a platform game I am working on. I have several enemy copies running around, and I want each of them to have a bazooka pinned to the, but ounce my player gets close to the first enemy, all of the bazookas move with the first enemy, leaving them floating in the air. They are also destroyed when the first is destroyed as well. If anyone can tell me how to pin them to each individual enemy, that would really help out. I know it has to do with uids, but have no real clue what to do from there.

  • I don't use this method too often but I have a lazy way of doing this, I don't know if it's necessarily the 'right' method, but I use 'FOR' :

    system(for) "name" from enemy.IID to enemy.IID > pin bazooka to enemy.

    This matches up the IDs, so first instance of bazooka would pin to first instance of enemy, second instance of bazooka pins to second enemy etc

    Also note that this will still mean that they are floating in the air from their current position, you'll have to also add : set bazooka position to enemy.x,enemy.y, to teleport them to the enemy position (unless they were created at enemy position of course).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not really sure what it is I'm suppose to do, but I have been adding a new event, click for (which is under loops?) then it gives me three lines to fill (name, start index, end index). Is that right? I think I might have missed something.

  • Yeah that's the one.

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