part12studios's Forum Posts

  • ok i got it to work using LiteTween.. i'm not sure it was the most efficient way to do it but it defiitely helped seeing your 'every tick' approach.. i just had to make it conditional to manage when the grow and shrink tweens fired off.

    Thanks!

    Caleb

  • sweet that looks great.

    Thanks!

  • ah good suggestion. i'll give that a try. i'm familiar with using Sine in other ways.

    Thanks!

    Caleb

  • Hi everyone,

    So I'm using spritefont and spritefont+ to see if it will work but i'm having no luck

    https://youtu.be/PDz6NZ6ZRs4 see how the score "boings" when you score a point? i'm trying to achieve that effect.

    i want to scale the SIZE of the number to create a "boing" effect. however it seems that this isn't effecting the font.. i believe what is happening in this case using LiteTween is it's changing the size of the box itself not the font within..

    So I'm wondering how this could be achieved. when i try to apply a value.. i'm not sure how i'd apply that exactly.. that seems like the possible solution but i'm missing the link to be able to apply a tween value to something like perhaps the "scale" parameter found in both spritefont objects.

    Thanks!

    Caleb

  • awesome thank you!

    Caleb

  • Awesome! Thanks a lot for clearing that up

  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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!

  • 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..