part12studios's Recent Forum Activity

  • ah the .set item value? ok good to know!

  • awesome thanks! I couldn't find anything concrete in my searching although it did leave me confused a little..

    In his example i see that he does check "does it exist" and has a condition of "if it exists.. cool do this" if it doesn't exist.. cool do that.." but i don't see in here where they actually do "Create" the keystore so it exists next time. or maybe it's created at some point along the way without saying "Create this key".

  • so looking at this example.. i'm still a little confused.. in the past you had to check if a key existed.. and if it didn't you created it.. in the example above I don't see where you can create it.. or is it created in some other step?

  • Hi everyone,

    So I've worked with the previous web storage a good amount.. and one of the big things i remember from before is that you had to check if a key existed.. and using an invert condition "if key does not exist"... create the key..

    in this new system I see I can do something like this:

    on start of layout:

    check item "keyname" exists.. but then what? does it automatically create the keystore?

    then i want to do things like compare, but this too isn't feeling familiar.. just feels like while I get it's not completely different, it's different in how I understood web storage to work with C2. I haven't seen any

    even the C2 manual seems to still talk about the old plugin, not the new one so that wasn't informative. I saw some other questions out there, but none of them cover this..

    I just want to create a couple of local storage values so I can save thing like high score and volume on / off so far.. so when you turn off sound and quit.. next time you come in the volume will still be off.

    Thanks!

    Caleb

  • yea i see what you mean now, thanks for shedding some much needed light on how events like this work!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ah ha! man.. and i've been using c2 for awhile now and never realized this.. that did the trick (for each enemy).. that's awesome.. I'll have to remember that in the future.. i figured that the compare value was basically "Every tick" and any time the player position value changed it would update the comparison with each object.. or something auto-magic like that.. heh

    Thanks!

    Caleb

  • so yea as far as I can tell i'm pretty much doing it like you said unless i'm overlooking something:

    https://www.dropbox.com/s/jbade64tam4bo ... 2.PNG?dl=0

    https://www.dropbox.com/s/w365r2nem5fzd ... e.PNG?dl=0

    I feel like it's effecting all of them universally and something is preventing each of them from reacting correctly because of this larger inherited behavior.

    The only difference I can see is that i'm using a global variable instead of a local, but that wouldn't seem to matter right? I mean the var is still associated with the player object exclusively..

    Thanks!

    Caleb

  • ok I'll try that. i am doing the instance variable already.. the player however has a global variable.. could be made an instance variable but since there was just one player i went with global.. I was already kinda doing this but not exactly so I'll see how your approach goes!

  • yea sorry that is correct.. imagine there are 5 lanes.. 1 is the highest and 5 is the lowest.. if you were on lane 3.. and the enemy was on lane 4.. you should appear behind it.. if you were on lane 5 you would appear in front of it.

    It seems like in general it's one or the other with my current approach.. either they are all in front or all behind.. and to your z order suggestion that's how I was trying to do it.. at least fundamentally, i'm obviously doing something wrong in my attempt.

    the issue for me is that an enemy is spawned off the screen to the right and enters the scene.. the player could move since the moment the enemy is spawned so it first appears correct possibly.. but if the player were to change his position any moment after that object is placed on the screen its no longer right..

    So I'm trying to get them to behave dynamically and for some reason something like this isn't working:

    on collision with player + not on the same lane as enemy, move enemy behind player (z order).. or even more extreme:

    on collision with player + not on the same lane as enemy, move enemy to other layer...

    As it is the system is a 5 number ID system that indicates which lane the player is.. if player is on lane 3 when touching an object with a Lane 3 ID then it's a hit / game over condition.. then ideally if the number of enemy is greater or less than the player ID it would be smart enough to snap the object to the appropriate z order or layer... though i'd rather not use layers for performance reasons..

  • Hi there,

    I have a project where a character is running along the ground.. but there are layers (think TMNT / Double Dragon side scroller) The player moves between 5 lanes..

    The perspective is angled so some obstacles you want to avoid when avoided are either behind or in front of the player.. however when I try various things nothing seems to work..

    So far I've tried a number of different things and the overall result is that i'm spawning these obstacles they all seem to want to stay behind or in front of the player..but since the player is constantly moving through the lanes they need to be dynamic..

    I tried doing things like "on collision with player" move in front of or behind player object.. I even tried moving to two other layers being ones n front and behind.. but nothing seems to help..

    I must not be understanding something fundamental about how these are triggered dynamically.. I have used behaviors like this before in static ways and that's fine, but this is the first time I've had to have things dynamically change.

    Thanks!

    Caleb

  • yea i don't think there is really.. it's not about layers though.. it's about knowing where to find things quickly throughout a project.. if i click on an object.. i'd love to know where that object is located.. in what layer.. not at runtime but while developing.. if you have multiple layouts.. and say multiple objects that look very similar.. finding which one is the right one can be a tedious process.. or ones that are hidden.. or behind objects in layers.. any number of reasons..

    Stuff like this would be super if they could incorporate it in Construct 3..

  • ah ok interesting.

    yea see what i would love to see is imagine being able to "get info" about a particular variable or object.. imagine being able to see how many times a certain variable is being used.. and by what.. i've had variables i made and ended up not needing/using.. but they sit there and i have spend time tracing down if it's relevant anymore.. which just becomes a hassle to hunt down over multiple event sheets...

    So yea it would be great if maybe Construct 3 could consider making the tool better for getting more information about objects in a given game especially more involved / complex games.

part12studios's avatar

part12studios

Early Adopter

Member since 24 Dec, 2012

Twitter
part12studios has 1 followers

Connect with part12studios

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

21/44
How to earn trophies