How do I create a "stack" for powerups? - Game Makers Help Construct 3 Features Hundreds of features to explore Showcase Games made in Construct FAQ Your questions answered Addons & Extensions Latest Updates Pricing Try Construct 3 Now Education Why Construct 3 Trusted by schools and universities worldwide Resources Free education resources to use in the classroom Privacy & Security Students do not need accounts with us Equity What we believe Partners We are in this together Setup a classroom in minutes World class documentation Pricing Learn Documentation World class complete documentation Getting Started Get Construct 3 Running on Mobiles System Requirements Other Topics The Interface Saving & Sharing Publishing Games Extending Construct 3 Addon SDK Manual Other Products Construct 2 Manual Construct 2 Javascript SDK Tutorials Official and community submitted guides Start Here Beginner's Guide Game Physics Save Game Files Screen Sizes Other Publishing to the Web Building Android APKs Publishing to iOS Optimisations Online Game Design Courses Browse all game dev courses Construct in Education Community Forums Community Forums Learn and share with other game developers Construct 3 Discussion How do I...? Show Your Creations Gamedev Ideas Free Arcade Upload and play games from the Construct community Blogs Game development stories & opinions Facebook Twitter Youtube Channel Reddit Community Pricing Asset Store Sale! Try now Register Login to account Construct 3 Features Showcase FAQ Addons & Extensions Latest Updates Pricing Try Construct 3 Now Pricing Education Why Construct 3 Resources Privacy & Security Equity Partners Pricing Setup a classroom in minutes World class documentation Pricing Learn Documentation Get Construct 3 Running on Mobiles System Requirements Tutorials Beginner's Guide Game Physics Save Game Files Screen Sizes Publishing Games Optimisations Courses Browse all Construct in Education Community Forums Community Forums Construct 3 Discussion How do I...? Show Your Creations Gamedev Ideas Free Arcade Blogs Facebook Twitter Youtube Channel Reddit Community Asset Store Try now Register Login Forum Home Unanswered Topics Newest Topics Active Users Search Navigation Forum Home Unanswered Topics Newest Topics Active Users Search How do I create a "stack" for powerups? Construct Construct 3 How do I...? Viewing Topic Post reply ❤Follow Topic(5) 0 favourites 4 posts From the Asset Store Create a Space Shooter Game (with free version of construct) $1.50 USD 50% off Fully commented source code/event sheet & sprites to create a space shooter game xanderwood Rnamon Joined 5 Jan, 2021 12 topics • 26 posts 1 26 Feb, 2021 Quote Hello friends! I need your help on the subject. I know what I exactly want, but I do not know how to "tell" the constract how to do it. I want to create a sort of "stack" for the powerups I collect. Each time the player collects a power-up (from a selection of 4) a power-up icon appears at the bottom of the screen, and when he collects a new power-up (while there is already another active) instead of the power-up replacing the existing one or running alongside the active one, his icon joins the stack at the end . After the power-up that is already active has finished working - I want all the icons to move one position towards the active power-up. Then the next power-up in the stack will start working. (I.e. the icon that was in position 4 moves to position 3, the icon that was in position 3 moves to position 2, and the icon that was in position 2 moves to position 1 and starts working) One step forward - except for the one that is already active (i.e. the new icon that is in position 4, the icon that was in position 4 moves to position 3, the icon that was in position 3 moves to position 2, and the icon that was in position 2 disappears ....) It is important for me to note that I have 4 different power-ups, and a situation can arise where you have several double power-ups, that is, you can have a power-up of a shield and then one of shots, then another one of a shield, then a power-up of power. Like I said I know what I want but how do I "tell" the software how to do it ... My problem is divided into several stages: 1- Every time the player collects a power-up, I need to check if position 1 is free. If so, put the power-up icon there and turn it on. If position 1 is not available, check that position 2 is free - then put the icon in position 2, if position 2 is not available, check that position 3 is free - then put the icon in position 3. If position 3 is not available, check that position 4 is free - then put it In position 4. I guess it's possible to do it using "else" but how do I tell him "if you already put the icon in one of the locations - stop! Do not put in the other locations because you have already put in one location" 2- When the active power up is over, I want to make the other icons "move" one position forward. Which will activate the power up that is first on the list. How do I tell them to move in the same order they were (you were in 4th place, move to 3rd place, etc.) only one position forward? I can not crack it ... that is, "the object that was in position X Y will move to a new position X Y (no matter what object it is)" 3- I guess the answers to the previous two questions will give me the knowledge to do what I want - that if all the places are active, and you collect a new power-up - then move only the power-up that is not active forward. I know it was a long question but I tried to be the most accurate in my question so you can help me, I really really thank you! Thank you very much Tagged: list stack powerups InDWrekt Joined 19 Sep, 2011 1 topics • 554 posts 2 26 Feb, 2021 Quote You can do this easily with an array using the push and pop commands. Create an array that has a size of 0, 1, 1. When you pick up a power up, add it to the array using push back. When the power up ends, remove it from the array using pop front. The active power up will be at array position 0 and each consecutive power up will be listed in order. drive.google.com/file/d/1j1qrviGaw4TJ6Bqs8y8-1mrrZ13_ucEN/view Edit: I had the front and back swapped around so I fixed it above. to be clear, you PUSH BACK and POP FRONT. Try Construct 3 Develop games in your browser. Powerful, performant & highly capable. Try Now Construct 3 users don't see these ads alextro Joined 22 Feb, 2012 32 topics • 1,161 posts 1 26 Feb, 2021 Quote Let's start by stacking items. Use for each (ordered) to set items in queue. https://drive.google.com/file/d/1YFyCYACxmmuZpqsKC9FmMpIXxuRnBoEa/view?usp=drivesdk Rnamon Joined 5 Jan, 2021 12 topics • 26 posts 2 27 Feb, 2021 Quote Thank you so much for the amazing answer! And with a files I can learn from! Thank you very much! I so appreciate it !!! Post reply ❤Follow Topic(5) 4 posts Return to board index Jump to: Construct ============= Construct 3 General Discussion How do I...? Scripting Your Construct 3 Creations Education and Construct Plugin SDK Translations Deutsch (de-DE) Español (es-ES) Français (fr-FR) Português (pt-BR) Русский (ru-RU) Game Development Game Development, Design & Ideas Distribution and Publishing Tools and Resources Job Offers and Team Requests General Open Topic Game Discussions Scirra Website Asset Store Website Issues and Feedback Construct 2 General Discussion Addons How do I....? Beginner's Questions Effects Your Construct 2 Creations Works in Progress/Feedback Requests Javascript SDK Work in Progress Addons Bugs Closed bugs Construct Classic Construct Classic Discussion Help & Support using Construct Classic Your tutorials & example files Completed addons Work-in-progress addons Your Creations Construct engineering Active Users There are 1 visitors browsing this topic (0 users and 1 guests) Your Location United States Products Game Making Software Animation Software Construct 3 GameMaker Alternative Make Your Own Game Pricing Documentation FAQ Construct 2 (Legacy) Education Why Construct 3 Easy Seat Management Free Teaching Resources Learn Javascript Partners Pricing FAQ Our Company About Us Our Team Press Kit Contact Us Community Game Assets GameDev Forum GameDev Tutorials GameDev Blogs Free Online Arcade Community Guidelines Scirra Ltd Studio 414, The Lightbulb 1 Filament Walk Wandsworth London SW18 4GQ United Kingdom Company number: 07626452 VAT registration: GB138656875 Legal Terms and Conditions Privacy Policy Children's Code © Scirra Ltd 2022 • All rights reserved v1027 • PRD-VM-WEB2a