Same action multiple of same object...

0 favourites
  • 6 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • I have things flying around the screen, leaving things behind for the player to interact with (be it to destroy or to power up etc) yet only one runs at a time.

    In example:

    Flying in space, a trash bag comes along, leaving litter behind. These trash bags can keep coming even if one is still around, but only the first (or only one, or latest) on screen actually does the leaving of said litter. I changed it to "For Every <object>" and it still just keeps it as the one trash.

    I'm not a great programmer and I've had this trouble before, but for the life of me I can't imagine how the language isn't clear enough to say that EVERY instance of the trash should leave something behind.

    If this was Mario, think of it this way: every goomba should move to the left, but when there are more than one, only the first loaded moves until it's destroyed then the next in line moves. This doesn't make any sense.

    For the developers: you are selling this to non-programmers, it would be helpful to have an explanation of how this stuff works since normal language doesn't seem to work as well. I'm guessing "for every" means something else than it does in reality. IRL, "for every cup, spill them over." One could easily spill them all, but a computer reads it as "spill one, then the next, then the next." Totally confusing.

    I can give my CAPX file if you need to see it in action.

  • a capx would be nice, because from your text it doesn't become clear what the issue is.

    Most people that get started with construct seem to have problems with defining the one instance that should do something instead of them all doing it. If I understand correctly you have the opposite problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Exactly. I've always had problems with this before, and seeing that people have trouble the other way around blows my mind.

    Thanks in advanced for the help. Look at the sheet labeled "Trash"



  • Forgot to comment my code, I usually take a day out to do that before it gets too big, but I hope it's not too confusing.

  • Instead of having the system create the bottles, have the trash spawn the bottles and everything works.

  • I cannot believe I overlooked that.

    Your help was impeccable!

    <img src="smileys/smiley10.gif" border="0" align="middle" />

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