YoHoho's Recent Forum Activity

  • Enemy-> On destroyed
    (press B to add a sub-event)
          System -> Compare two values -> random(10) is less than 1   :   Enemy -> Spawn PowerUp[/code:w4zzx50r]
    

    Yup. That's what you meant. Thanks.

  • You can do something like this:

    On enemy destroyed
       random(10)<1   :   Enemy spawn PowerUp[/code:bu872ehy]
    
    Every time an enemy is destroyed, there will be a 10% chance to drop a power up.
    

    How exactly is this entered in an event sheet? Does it involve the random instance of an Enemy? I just tried to enter this into the 'Vertical Space Shooter' template and I don't understand.

  • OK, I give up on this array thing for creating a level unlock.

    I'm still unsure of how to even label the values to text so that I know what I'm looking at in the debugger. I'm just going to have to look up something more recent that is a general level unlock system with arrays. I did get to understand it a little better but it's still making me nuts. I didn't even know what you could change values in the debugger until now... like 2 years later!

    I was able to come up with a system that is working the way I want without arrays so I can continue with finishing my game. Thanks again.

  • I would definitely do this with arrays.

    Each Row would have a World/Stage code. For example, "W1S1" could be world 1 stage one.

    Then there would be two columns: Unlocked and Replay. They would all be set to zero.

    As players complete stages, it would change the array. Completing World 1 Stage 1 would change the W1S2 Unlocked value to 1.

    Defeating a midboss would change the appropriate Replay values to 1. Defeating midboss 1 would change the Replay value for W1S1 and W1S2 to 1.

    Defeating World 1's final boss would change the Unlocked and Replay values for W1S1, W1S2, W1S3, W1S4, and W1S5 to 1. It would also change the Unlocked value for W2S1 to 1 as well (since that's the first stage in the next world).

    Finally, the World Map (or stage select screen, etc) would reflect the current state of the array. For example, stages with an Unlocked value of 0 could be drawn at 50% opacity or in greyscale, and stages that have a Replay value of 0 could have a little lock icon.

    Is that what you're looking for? You could do also this with dictionary entries, if it's more comfortable (just more typing).

    Yeah, I figured it was going to come down to arrays.

    One of the issues I had with looking arrays over was I never found a list of tutorials that would explain how arrays could be used for multiple separate things in one project; kind of like how you just have separate event sheets.

    I just quickly found a YouTube tutorial on using an array for a weapon inventory and I'm going to follow that while integrating your World Unlock/Replay concept. I wouldn't have thought of 2 separate values for this but it makes sense. Maybe when I'm done I can get a Hi-Score array working as well.

  • Having yet to use arrays properly (just a note), I'm trying to figure out the best way to have a level unlock system that works in a certain way. The game would go as follows:

    Select World 1 (all Stages are locked; automatically start with Stage 1) -> Pass Stage 1 and proceed -> Pass Stage 2 and proceed -> Defeat Midboss 1; Stage 1 & 2 are unlocked for replay and proceed -> Pass Stage 3 and proceed -> Pass Stage 4 and proceed -> Defeat Midboss 2; Stage 3 & 4 are unlocked for replay and proceed -> Pass Stage 5 and proceed -> Defeat World Boss; Stage 5 is unlocked for replay and proceed

    Essentially, in order to unlock all of the stages for replay in a world, you have to defeat the midbosses to unlock the previous stages; defeating the world boss would unlock the last stage and the entire world for replay/continue point.

    I really wouldn't know where to begin here. I thought I could use a letter system since the stage numbers are close to all the quantity of letters in the English alphabet, but I'm not sure how to keep work with a variable for both stages AND worlds. Maybe now I can finally figure out how arrays work correctly. Any help would be appreciated

  • ....

  • ...

  • Hey BalthazarTheWizard,

    Here is an example of how it can be implemented. I made it with C3 so please open it there. It should work for C2 as well.

    I hope it will help you.

    c3p-file: https://1drv.ms/u/s!Ap_-qxoGKbDccub_B5pnfUs2rSM

    Construct 2 won't even find the file when you try to open. Do you have a version of this for C2?

  • RBuster

    I've never used C3. If someone wants to use the code as a base, you can use.

    Cheers.

    Hello.

    I was looking to get your 'Plus' by PlayLive behavior/plugin for a .capx I'm trying to view. Is it available?

  • I'm looking for the following behaviors:

    'Scrolling' by rex.rainbow

    'Plus' by PlayLive

    I need them to open a .capx downloaded from the 'How do I' section. Any help would be appreciated.

  • Try Construct 3

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

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

    There is "LayoutName" expression.

    System- Compare two Values -> LayoutName equals "Level1" : Go to layout Level2

    You can also create a variable "NextLayoutName".

    When level 1 starts, set NextLayoutName="Level2"

    When level 2 starts, set NextLayoutName="Level3"

    etc.

    At the end of each level use event "Go to layout (by name) NextLayoutName"

    That's exactly what I was wondering. It does make sense to create a variable AND then have the 'Compare Two Values' with text instead of numbers. I'll try putting this together this weekend. Thanks for the help to the both of you.

  • On whatever the action is that completes the level system > go to layout > layout name

    Do this in each level for the next level. Same idea for the level skip, except that whatever it is that allows the level skip is where you put in the go to layout.

    so say they reached a door that leads to next level setup the condition on collision with object door and action system go to layout level 2

    if they got a certain item in the level that allows the skipping of level 2 add a sub condition with a variable setup for that item being obtained

    so conditions:

    on collision with object door

    if level skip is true

    Action:

    system go to layout level 3

    does that make sense?

    Well, I can see myself creating an event sheet just for this which won't be a problem since I'm not versed in arrays. But how exactly do I put together the event of 'On Level 1' -> If Complete -> Go to Layout 'Name'? I don't see an 'On Layout Name' event.

    Would I have to put together a system that requires comparing 2 global variables? I think I can manage something like that, but I'm not sure how to get the number out of my 'Layout Name' somehow to integrate it with a global variable that matches itself.

YoHoho's avatar

YoHoho

Member since 31 Aug, 2015

None one is following YoHoho yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies