Aquanex2's Recent Forum Activity

  • Okay. I have no idea what the issue is at this point, but this is what's been going on, and it's bonkers.

    I have an array called StarCountArray for the stars. At first, I had it set up so that after you get a star, it would set the XY value of the star from 0 to 1, then it would add the total to a Global variable called Totalstars using a Function called AddStars.

    So like this:

    On Function "AddStars" ---------------Set Totalstars to 0

    subevent -For Each XY element ---------------- Add StarCountArray.CurValue to Totalstars

    It worked like a charm, but I realized that if you got a star, then left the stage to the level select, it would still count up the total amount of stars collected, which isn't what I want.

    So I tried something else.

    Keeping the same function, I made 3 new global variables:

    CountUp1

    CountUp2

    CountUp3

    After you pick up a star, depending on which one you picked up, it would change the value of the corresponding variable to 1.

    Then I made an event for when you reach the goal.

    After you reach the goal, I have a For Each loop that sets the StarCountArray value of each star in the layout to it's corresponding CountUp variable.

    I know it sets the right values because I made 3 Sprite Text objects to keep track of it, setting their values to the StarCountArray values, and every value became 1 when you reached the end of the level.

    In the same For Each loop, after it does the action mentioned above, it does the AddStars Function to add the stars to the Totalstars variable.

    Sounds like it should work then, right? Well... No. No it doesn't. The value of Totalstars becomes 1. ALWAYS. even after I clear another level and get all of the stars on that one. The value of Totalstars stays at 1 no matter what, but only after I clear the first level. I've looked over it several times to find errors. I couldn't find anything wrong. It doesn't make any sense.

    If you read my essay of a topic, I thank you. If you think that you know what the issue is, or you think that there's something else I could try, then PLEASE tell me. I will be eternally grateful!

  • Not sure this is enough info for anyone to help you. There is probably an event or action that you don't realize is affecting something.

    That's what I initially thought, but I just don't know what it could be. I scanned the entire event sheet to see if there could be another event that got triggered that keeps him active, but I didn't see anything.

    It just doesn't make any sense to me.

  • At the end of the level I have the goal, and when you touch it, several actions take place. One of the actions is to disable the platform behavior on my player. At first I thought, well maybe I messed up somewhere, but NO! The only difference here is the layout I'm on.

    All of the other actions activate when I touch the goal, so I don't know where I went wrong. If you exempt all of the other actions it basically goes like this:

    Player -> on collision with goal ->->-> Player -> set goal to true

    Player -> When goal is true ->->-> set Platform disabled

    But it doesn't disable platform when I touch the goal. Why Not?

    Please help! :(

  • My guy > collides with button > set button.variable to "active"

    button.variable = "active" and button.Y is greater than the ground > button.Y = button.Y - 0.2

    button.y = ground.Y > set button.variable to "done"

    button.variable = "done" > Do something

    That's probably how I'd do it

    ~Sol

    Thanks, but I've already figured it out how I wanted to do it. Nice alternative, though!

  • You can just move it down. Up to you.

    Okay. I think I know what I wanna do! Thanks everybody!

  • No, those are just potential options. It's up to you which is most appropriate. Generally collision is what you want to test, but something.s if the button is a one-shot, or has to be held down.

    My button is a one shot button, but I want it to be pushed into the ground when my guy lands on it. I just don't know whether to make it an animation or do something else.

  • My guy > on collision with/is touching/is overlapping button (event) > do a thing (action)

    Do the slashes mean to make it an OR block?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm creating a platform game, and I was wondering how I would create a button that my guy would have to land on to Activate.

    Any ideas?

    Thanks in advance!

  • Create a sub event and use

    Some Condition = true

    System>Trigger once while true> Play Music

    Set Condition = false

    As long as a Condition or Variable is true, it's true every tick so you need to switch it off or back to "false". If the music is not set to loop, it will only play once.

    Thanks! Y'know, I've never tried using that condition before... I never thought it could be used like that! Mind blown! :O

  • In my events sheet, I have it set up where it'll play a sound when a certain variable is true. The thing is, it plays it, but it won't stop! It just keeps playing the sound infinitely!

    How do I fix this? Any help is greatly appreciated!

  • I was able to download it... although it is my own dropbox. I'm not sure how to help there.

    I waited a bit and tried again, it worked this time! I'll let you know if I get it working!

  • Hey oosyrag, I'm having trouble downloading the capx... Dropbox is acting up for whatever reason. -_-

Aquanex2's avatar

Aquanex2

Member since 19 Nov, 2014

None one is following Aquanex2 yet!

Connect with Aquanex2

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies