smumpy's Recent Forum Activity

  • So essentially I have a total of 16 power ups available, with 3 slots available to the player to equip them, so the player can have 3 power-ups equipped at one time.

    Issues:

    1) the power-up images that the player interacts with (drag and drop into equipped section) needs to then correlate to the power-up events themselves (this seems rather straight forward; just have it set a variable to true when it is slotted; if said variable is slotted then allow player to activate/deactivate the power ups when _ button pressed.)

    2)the power-up images need to be able to be dragged and dropped into the "equipped" slots, when one is slotted it needs to set the previously equipped to "unslotted/unequipped" allowing the player to swap power-ups in and out

    I have shot in the dark on this one and approached from a few angles in my head;

    my first thought was to have variables that trigger on and off when the player selects a power-up, though i am having trouble imagining how to get this to work; my thought was to have three variables represent the 3 different slots, when a power-up is dragged and dropped into slot2 it sets slot2 on that power-up to true and slot2 to false on all other power-ups, theoretically i think this would work but am not sure if this is the best way to approach this.

    another thought i had was using an array, i am not exactly sure how i would use an array to accomplish this though. (to that extent i have very little experience using arrays other than the tutorial videos i have found online). I understand that I could store each power-up in the array but am unsure how to get the array to coincide with the power ups being equipped and furthermore activated.

    truthfully i am just having trouble imagining what the code would be on this one and would greatly appreciate some help, thank you for you time and patience.

  • not exactly sure if this would work but in theory maybe you could just assign the same thing to each player, so there is a kill tracker for every entered player. so maybe if four people join the game it registers 4/20 players and tracks each?

  • thank you very much Laura_D, that's cool i didn't expect I could continue having my games up, that is exciting!

  • ok i think i get it, i will test this and post the results later, i gotta head to school, but that is an interesting suggestion i will definitely try that.

  • create a number variable to track your kills, so basically for every enemy killed add 1 to "Kills" number variable, you can use the same logic to track your deaths, then if you want to display this in the game create a text object and set it to display the "Kills" number variable every tick, now it will display your kills where ever you place the kill tracking text object in your game.

    I'm not too well knowledgeable on saving data in Construct, but from what I understand you can use Local Storage object to save data from game to game, you can read more about it here;

    scirra.com/tutorials/526/how-to-make-savegames

  • woot woot, glad I could help

  • thank you! Nepeo

  • So I added in the logic to this and have run into a problem,

    I use "Scoreext(1,2,3,4,...,12)" to represent the secondary number variable that actually changes the level and use "Score" number variable that adds up throughout every level (there is only one instance of "Score" that is used across all levels)

    [to explain further, "Score" is set on gamelevel1 to 0 and increases for every enemy you absorb, as you go through levels, the player's score is always referring to "Score" number variable created on level1]

    essentially to do what you suggested I added a variable to each level which is set "Scoreext(1,2,3...,12)" to "Score" number variable every tick. (There are 12 levels in the game)

    I then set it so (trigger once) when Scoreext (1,2,3...,12) = 1000 [this number varies from level to level] go to gamelevel2 and set Scoreext to 0

    the problem i have encountered is that if you apply this technique to only two levels it works fine, however if you do it to all twelve levels it suddenly stops working on any level. I have noticed from testing that if you make the game set "Score" to 1000 it will go to gamelevel2 as intended, however if you make the game set "Scoreext" to 1000 it does not go to gamelevel2 [I believe this is the core of the issue]

    With that I believe that the reason it isn't working is either that maybe it has something to do with the-- Set "Scoreext" to "Score" every tick (though I don't get why that would break it)

    or maybe that it has to do with the fact that I made it so there are 12 "Scoreext" that all are individual to the level they are on; the list looks like this gamelevel1 = Scoreext, gamelevel2 = Scoreext1, gamelevel3 = Scoreext2, so on so forth. Maybe the issues lies in that there are multiple instances of the "Scoreext" that are all referring to the one "Score" number variable?

    I'm not sure, any help would be appreciated.

    Also, , do you use the every tick function to make the variables count up together or is there another method I'm not seeing? If there is another method I could use it to further isolate the problem and test.

  • plinkie to the rescue again, thank you, that makes a lot of sense

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • is moose a part of Family1? because if so your code is telling it that on collision with moose to subtract 1 from lives.

    maybe add two collision boxes to each (both the player's ball and the moose) to differentiate where the collision takes place, so you have a box for player's feet (or bottom of ball) and a box that represents "top/front/back" of player, and then a box that represents the "top" of the moose and another that covers the "bottom/front/back".

    then set it so if player's "bottom" collides with moose "top", destroy moose, add whatever to points

    BUT

    if player's "top/front/back" collides with moose "bottom/front/back" then subtract 1 from lives

  • thanks! newlee

  • So I'm wondering is there a way to use the for statement in conjunction with a global number variable to set it so that, for every let's say 1000 points (or otherwise everytime 1000 points is added to score, or for every 1000 points added to score) go to next layout? I basically just want a level change that is based on accumulated score.

smumpy's avatar

smumpy

Member since 29 Aug, 2018

None one is following smumpy yet!

Trophy Case

  • 6-Year Club
  • Email Verified

Progress

7/44
How to earn trophies