RafaelMatos's Recent Forum Activity

  • That's great!

    Sorry my internet went offline for some reason and could not respond earlier :/

    One thing

    +Dictionary: For each key

    ++Dictionary: Is not empty

    +++BTLevelSelect: LayoutName = Dictionary.CurrentKey

    this do not need to be a sub-events

    You can make only one event with this 3 conditions - works the same but takes 2 events less

    Thanks, I'll change it

    Now I need some sleep. XD

  • This makes it even simpler.

    Instead of this Dictionary: Add key "[episode] & "level" & [level]" with value [score]

    use Dictionary: Add key "Layoutname" with value [score]

    Thats what I'm doing now. I save with webstorage (set local key LayoutName to ScoreTemp)

    and for the dictionary (add key LayoutName with value ScoreTemp) but when I refresh the game, the data is gone

    Edit: shinkan that's how I did it. So far It's working and saved me tons of unnecessary events. So cool. Thanks for the patience.

  • let's make it simpler. Imagine you have 3 variables:

    1. Number variable [episode] = 1 - this will keep track of current episode you are playing

    2. Number variable [level] = 1 - this will keep track of current level you are playing

    3. Number variable [score] = 0 - to keep track of current player score

    When player finish any level you make an event:

    Dictionary: Add key "[episode] & "level" & [level]" with value [score]

    So when player finish level 2 of the episode 1 and his score is 1234 it will add a key [ "1level2": 1234 ]

    when he finish level 5 of episode 3 with score 5432 it will add a key [ "3level5": 5432 ]

    so key name is made of a combination of: variable [episode] a string "level" and a variable [level] - which gives for example "3level1". And value of that key will be a variable [score].

    Thats the point. The only thing that say what episode and level I am is my layout name. I have only one Event Sheet for all levels and 2 more (for now) that will handle the first screen and the level select screen. So the only way to know where I am is using Layout's name.

    Edit: Is there a way to break the characters of layout's name?

  • shinkan

    I'm sorry but I'm too stupid to understand it =´[ I don't know dictionary very well. I'll try to explain where i'm stuck. For example, when the player accomplish the level 2 of the episode 1 I'll save it with webstoreage => "Set Local Key LayoutName (which is 1Level2) to ScoreTemp (which is a global variable that holds scores until it get saved) Ok, then I get lost. When do I need to add keys to episode and levels?I mean, the value will be the string episode and the key will be my "value"? and...Sorry I would add more questions but i'm too lost to even know what is it LOL

  • shinkan

    Thanks man. I'll try it.

    shinkan

    Do I need to create all the keys for all episodes and levels before and manually?And how will I create more than one Episode key without overwrite it

  • It doesn't look like will be a good option because I'll have hundreds of levels.

    1Level2 => "1" is the epsode and "Level 2" is it's respective level.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm having a hard time to understand all the steps using the dictionary, webstorage and AsJSON. I've already read the manuals and I didn't get much.

    My save game will be the same as the angry bird game style.

    So I've created a couple variables that will temporarily store all the values that I need to calculate the player's score, then I save it to a dictionary. After that I have no clue how to save the game using dictionary information using webstorage and load it when needed, in order to unlock the touchable buttons of it level of the game.

    Edit: Also I don't want to save all the state of the game, only the dictionary content, which will unlock all the levels by asking, if level name is stored, them unlock it and show it's score.

  • jeffige

    I've already test it and can't manage to scroll smoothly. The camera moves too fast. So i'm using an invisible object with platform and scroll to behavior. This way work nicely, only for moving to left and right though.

  • check if sprite.count = 0?

    I can't use it because I don't know how many instances of this object will have. I mean, I know but there will be so many layouts with different counts that wouldn't be good idea.

    Edit: Nevermind. I though I'd have to put the numbers everytime. I've tested it and works. Thanks!

  • Self-explained title =P

    I just know when any instance of the object is destroyed but not all.

  • edwardr

    Are you tring to create a menu with options and others stuffs? Because I still need to do it as well and I think setting a layer as global and only using groups is enough to build one I guess.

  • The equation is correct. Using impulse to launch the projectile is where the variance is.

    Impulse = Force*time

    and from best I can tell dt is used for time and that varies.

    Try setting the velocity instead with:

    velocityX=speed*cos(angle)

    velocityY=speed*sin(angle)

    Actually i'm using force but I prefer to keep things more simple. I'm not good with math and I need to build something that I can work with more easily in the future, in order to fix bugs and make adjusts. So I decided to compare different ranges of the overall velocity (intervals of 50) in the collision's moment, instead of trying to get the exactly velocity, which C2 has no expression for it. I think this way I keep things simpler and, since the mass will always be the same, the result of KE=0.5*MV² would always be in the same proportion of whatever velocity I got. I did this way and so far it's working nicely regarding to each bonus the player gets and how fast the ball hits the object. At least these bonuses is being coherent and that's my goal.

RafaelMatos's avatar

RafaelMatos

Member since 8 Mar, 2014

Twitter
RafaelMatos has 1 followers

Connect with RafaelMatos

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies