The Instance variable for Enemy sprite with EnemyBox

0 favourites
  • 6 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • It is a platform game. I am following this tutorial construct.net/en

    I am using an invisible rectangle sprite to move the enemy sprite so that the platform behavior won't confuse when the sprite animation changes. Multiple enemies are needed to be copied in the layout. However, I am confused what should I do with the instance variable so that each enemy can mirror on their own when they face left. Here is my project file: dropbox.com/s/bwt8nj6z12mauon/Adventurer%20Dog.capx

    I tested with 2 enemies in the project. However, both of them faced left even though only one of them walking to the left. Please check the .capx file first. Thank you

  • Howdy, I would like to see if I can help you, but the capx download link you sent is modified in your message. PM me the link?

  • Howdy, I would like to see if I can help you, but the capx download link you sent is modified in your message. PM me the link?

    I'm sorry I can't PM you since my rep point is below 500. Here is the link

    dropbox.com/s/bwt8nj6z12mauon/Adventurer%20Dog.capx

    I really hope someone can help a beginner like me

  • Hi, sorry, I haven't had a chance to have a look at this, hope you figured it out =)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have to pick spider that goes with the box. 1 way to do this is use containers. But that means also that you have to create spider & box during runtime.

    Another way is to just give spider & box a identification number (or string). Those with the same identification number are a pair.

    Like this:

    https://www.dropbox.com/s/wod7r8c939bta ... .capx?dl=0

    I gave spider & box an instance variable 'ID'. In the layout editor i gave them matching numbers.

    Now, if you pick one, you also pick the other.

    As in event 3, where i pick each box, and at the same time the spider with the same ID as the box. Now the right spider gets set to the position of the right box.

    As in event 20. Where the 'on collision' auto picks a box. And i pick the spider with the same ID. The action of the box is updated, and the mirroring of the spider with the same ID is updated.

  • 99Instances2Go Thank you very much for your help. It is really an valuable information for me. Thanks a lot

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