Congrats2u's Recent Forum Activity

  • Ps: i use your informations you gave me in your last post for this task so its very usefull for my current task!

    ive got 12 symbols, i saved in this "array_pool" and 3 of them are the "right" symbols (symbol 1- 3). For each round i have to take out one of the "right" smybols (to avoid they will be used two times). The other symbols can appear two times on differend rounds - that wouldnt be dramatic.

    in the next round (round 2) there are only two right symbols (for example symbol 1 was used in level 1 now the system should choose between array position 1 and 2 for symbol 2 and 3). The rest symbols could be the other array slots (4 - 11 or symbol 4 to 12). In round 3 the last "right" symbol should be choosed - the rest can be filled again with the rest symbols (again array position 4 - 11 or symbol 4 to 12).

    The advanced task is to save each round like i descriped in the post before, if the player failes in one level and has to do round 1 - 3 again. puuuuuuuuuuuuuuuuuuuuuh crazy stuff....

    Thats difficould in my oppinion.

  • 99Instances2Go wooooooooooohow that was unexpected

    There is one last thing remaining iam onto code for this game. The last step. After your supprot iam much better in understanding the tools and events in construct2 thanks for that!

    Basically level_1 is done. This is the level, where you have to find the footsteps and fill your inventary book with some informations (or random events) you can collect durring the playtrough.

    Currently iam on level_2. In this level you have to find the right path trough a cave. This cave has 3 "doors" you can choose. Basically level_2 is splittet into 3 Rounds. In round 1 you got one symbol on each "door". in round 2 you got 2 symbols on each door and of course in round 3 you got 3 symbols on each door. In each round, there is only one symbol, which is the right one. Therefore you can check your inventary book to compare the complete symbols with eachother.

    Iam writing down the tasks, maybe you got an idea how to handle this straigth (like you did before on the other tasks, i had problems with (Thanks again for your awesome support by the way) )

    Setup:

    Ive created spawning areas (sprites) whit its dimensions are dynamicaly changable. Inside this areas the symbols should spawn, so when i change the size or the position of the sprites, the symbols will be spawn on the changed values too. This works perfectly so far - but not for the whole game logic i would need. Currently i can spawn objects i have "fixcoded" from a "non array based" event.

    Now the difficould part:

    If you want to start level 2, round 1 should set up three symbols (one on each door), which will be loaded from an array (i think now i have to use arrays (later more)). This symbols have to be spawned on each spawning sprite (i told above) on a random position (this works but like i said not with arrays but with fix coded sprites).

    But now i have to choose the sprites more "controlled" because in level 1 there is one "correct" footstep you have to follow, and on which you can find the specific symbols too. so basically there are four different footsteps, with three specific symbols you can find, and which are filled into the inventory book. One of this paths is the right one but you have to find out which one.

    in level 2 you have to find the right way, but if you didnt found the symbols, youre maybe lost, because you cant know which symbols are the right one.

    So in round 1 there will be one right symbol on a door and two false symbols on the other ones. in round 2 there are two symbols on each door, but one of them is the right one. in round 3 its basically the same thing except there are 3 symbols (and one of them is the right one - so you have to check your inventory book and compare the symbols)

    now the main thing is - you can leave level 2 to find more symbols if you didnt found them before to make you inventory book complete, but if you return in level 2 the symbols should be on the same place.

    Therefore:

    Ive created 4 arrays.

    Array 1: My basic symbol pool: All symbols i have to use from my main sprite with the differend animation sprites (your idea ).

    Array 2 - 4: Basically the array with the specific informations about which symbol was randomly choosed, and on which position it was placed (the position should be saved and loaded, if i leve level 2 and return into because it is a different layer and a part i forgot to tell is that you cann fall back into round 1 if you fail in round 2 or 3 (because its a cave and you choosed the wrong path you will walk into nothing and start again)). But the symbols in round 1,2 and 3 should be on the same place. Thats the reason i would have to store this informations about it.

    I know its not easy to understand or may my description is not so good . But iam currently working on this task and i would be very happy if you could give me some adivices how i could solve this. Maybe your workfolw will be much more better than mine. (Iam sure it will)

    Currently iam on the step:

    Fill the Arrays for each round with baically one right sprite and two other ones.

    99Instances2Go - if this game is finished you will be one of the first gamer if you want to

    Thank you very much!

  • 99Instances2Go Thank you very much again and again and again for your description ive made a screenshot of my event_sheet how it works for me:

    (ive to less reputation points to post an url and if i use the image-url function the file does not appear - so there is a snippet of the link you would have to copy paste)

    postimg.org/image/iwxr1vbrb/

    Thank you!

  • Okay of course iam now on the next step. And again - its a little bit weird.

    Description:

    After my zoom in i set the clicked world space coordinate to Touch_X_Old and Touch_Y_Old, to save the touch position i zoomed in (this works fine). The camera zoomes in and now iam on the search view.

    Now to my search Input problem:

    On any touch end -> i set Touch_X and Touch_Y to the current position. (The position is inside my window screen, so lets say on the map view i was touching the point 3500x 3500y and iam on this place right now and iam touching nearby, for excample to 4000x 4000x). The camera should move smooth to this location - but it makes weird things.

    My setup:

    Touch_X_Old/Touch_Y_Old are the position co-ordinates i get from my map view (witch zoomed into search view right now)

    Touch_X and Touch_Y will be set if i fire the touch end event. So far so good - i got two positions - the Touch_X/Y and the Touch_X/Y_Old positions. Now i sould be able to set up a simple lerp function right?

    Here it is: On every tick -> System -> distance(Touch_X_Old, Touch_Y_Old, Touch_X, Touch_Y) > 20 ->->-> Scroll to (lerp(Touch_X_Old, Touch_X, 0.5), lerp(Touch_Y_Old, Touch_Y, 0.5). If i remove the distance check it doesnt move ... so i think my lerp function is the problem....

    Then: On every tick -> System -> distance(Touch_X_Old, Touch_Y_Old, Touch_X, Touch_Y) < 20 -> Set Touch_X_Old to Touch_X and Set Touch_Y_Old to Touch_Y (If the distance is smaller than 20 i have to set the current Touch_X/Y to Touch_X/Y_Old for the next scroll right?)

    And basically thats it...but this doesnt work. What is wrong with this events? Ive removed the distance check to see if the lerp function works - but this isnt the case...and i dont know why.

    Be a wizard again 99Instances2Go (or others)

    Much of thanks!

  • 99Instances2Go OMG! I didnt knowed i could do that! This my incredible friend - solved my problem! THANK YOU SO MUCH!

    I can now check the Background Layer, and because of my fix stage size (11800x6600) iam able to get the real world co-ordinates based on this size (not the scale world co-ordinates like before and wich didnt where matching for the two game modes). Now my zoom works and it gets on the damn right position! AWESOME AWESOME AWESOME!

    Thats the thing i was talking about at my very first post (or one of the following): Lerning from the best! 99Instances2Go

  • 99Instances2Go

    R0J0hound

    Hey guys!

    Ive got another big problem...i run into - and i hope you can help me out with this. At first i should descripe my layout to make it more clear.

    Ive got a level_1 layout. This layout has a size with 11800x6600 px. The window size is 1180x660px. The layout got 10 differend layers, filled with sprites. All of them, except the first layer (this is my gui layer) got a parallax with 100,100 to keep scrolling possible.

    Basically this level is splitted into two possible perspectives. The first is the map mode. The other is the search mode.

    Right at the beginning "On start of layout" iam scaling all this dynamic layers to 0.1 to get the complete stage visible (this is the map mode). My goal: If the player is touching to a specific position, the camera (or better the dynamic layers) should scroll to this position and zooming in at the same time. Ive written two differend events. One for touch input in map mode and one for touch input for the search mode. If iam in map mode, the search mode input is deactivated and vice versa.

    So now to my question:

    Iam using Touch.X / Touch.Y inputs for both modes (Touch.AbsoluteX/Touch.AbsoluteY doesnt work, because i would need the world space, not the screen space (i think)). To zoom onto a specific position doesnt work. At the moment i can zoom in and out (from 0.1 to a scale factor of 1 and vice versa). this works great. But i dont get it to find a solution how to scroll onto the right position when iam switching from the map mode into the search mode.

    Does someone got an idea how to handle this? Or maybe an excample for this kind of problem? Iam absolutly clueless right now, because ive tried so many differend things (scroll to behaviour and and and). But if iam using this option, my target camera objects got an weird parallax/offset.....and......lets forget about this... i think i need the right formula for handling positions, if i got a scalefactor on my layers or something like that.

    Every solution would be great. Sorry for the long post. If you need more informations, please tell me.

    Summary of my problem: (to make it more understandable )

    large stage (11800 x 6600), window size (1180 x 6600)

    scrolling and zooming in/out depends on mode.

    If mapmode to searchmode: Zoom in from scalefactor 0.1 to 1 (for all dynamic layers)

    If searchmode to mapmode: Zoom out from scalefactor 1 to 0.1 (for all dynamic layers)

    if you are in mapmode and youre taping for example to the coordinate 7545x, 3456y - the window should zoom and scroll to this position. (smooth camera movement that would be important)

    if you are in the searchmode (high zoom level) there should be only small position transitions (all touches you do right in the window canvas (tap and scroll to position nearby, tap and scroll to position nearby and so on)). The small camera movements should be also smooth.

    Thats basically it.....this thing is driving me crazy, i hope you can help me out!

    Thank you very much for your awesome support in this community!

  • Hey guys!

    So thanks for your input, but i ran into big trouble solving this problem. At first i should descripe my layout to make it more clear.

    Ive got a level_1 layout. This layout has a size with 11800x6600 px. The window size is 1180x660px. The layout got 10 differend layers, filled with sprites. All of them, except the first layer (this is my gui layer) got a parallax with 100,100 to keep scrolling possible.

    Basically this level is splitted into two possible perspectives. The first is the map mode. The other is the search mode.

    Right at the beginning "On start of layout" iam scaling all this dynamic layers to 0.1 to get the complete stage visible (this is the map mode). My goal: If the player is touching to a specific position, the camera (or better the dynamic layers) should scroll to this position and zooming in at the same time. Ive written two differend events. One for touch input in map mode and one for touch input for the search mode. If iam in map mode, the search mode input is deactivated and vice versa.

    So now to my question:

    Iam using Touch.X / Touch.Y inputs for both modes (Touch.AbsoluteX/Touch.AbsoluteY doesnt work, because i would need the world space, not the screen space (i think)). To zoom onto a specific position doesnt work. At the moment i can zoom in and out (from 0.1 to a scale factor of 1 and vice versa). this works great. But i dont get it to find a solution how to scroll onto the right position when iam switching from the map mode into the search mode.

    Does someone got an idea how to handle this? Or maybe an excample for this kind of problem? Iam absolutly clueless right now, because ive tried so many differend things (scroll to behaviour and and and). But if iam using this option, my target camera objects got an weird parallax/offset.....and......lets forget about this... i think i need the right formula for handling positions, if i got a scalefactor on my layers or something like that.

    Every solution would be great. Sorry for the long post. If you need more informations, please tell me.

    Summary of my problem: (to make it more understandable )

    large stage (11800 x 6600), window size (1180 x 6600)

    scrolling and zooming in/out depends on mode.

    If mapmode to searchmode: Zoom in from scalefactor 0.1 to 1 (for all dynamic layers)

    If searchmode to mapmode: Zoom out from scalefactor 1 to 0.1 (for all dynamic layers)

    if you are in mapmode and youre taping for example to the coordinate 7545x, 3456y - the window should zoom and scroll to this position. (smooth camera movement that would be important)

    if you are in the searchmode (high zoom level) there should be only small position transitions (all touches you do right in the window canvas (tap and scroll to position nearby, tap and scroll to position nearby and so on)). The small camera movements should be also smooth.

    Thats basically it.....this thing is driving me crazy, i hope you can help me out!

    Thank you very much for your awesome support in this community!

  • Hey Guys. Its me. Again.

    So ive a question about how to set up a smooth camera scroll (i know iam not the only one, but i couldnt find a solution for my problem). Basically: My window size = 1180x660; Stage size = 11800x6600 (its a huge scene i know );

    In my game the camera should smoothly scroll to the position, if you click into the window area. Basically you have to follow footsteps, and i want to make only small scrolling steps inside my window (so basically the huge stage is irrelevant, the smooth camera scrolling is only for small distances).

    Example: When i start the game my window center position = x590, y330 (1180/2, 660/2, basically the left/top corner of my stage). If i click to the coordinate x1180 and y 660 (the right/bottom corner of my window)i want my window center moves smoothly to this position. Then the next max possible position to click on would be x1790/y990 and so on (because the maximum distance is: window center to window boarder, so i would make only little steps but thats exactly what i would need for this game). You should explore the map step by step, so if i got a map size with 11800/6600 you would make small scrolling steps into each direction (except youre on the boarders of course).

    I hope you can understand my description, its a little bit tricky to understand.

    Thank you so much!

  • 99Instances2Go You´re crazy!

    I thought it would be the best way to handle this with arrays...maybe for storing the array values compact and manipulate them also compact. Funny i thought i have to use arrays for the footsteps and for the inventory book...but both thoughts where false. Thank you very much for your imput. It makes me better in understanding construct2!

    Very nice support! AWESOME!

  • Okay maybe there is a better solution for my inventary book (currently the layer will be set to invisible). Something like the Container behavior??

  • Hello again... so i was playing around with your capx file - it works like a charm. But at first: how can i stop the frames beeing animated? i could not find a checkmark or something to let them stay on their animation frame (In my project, in your project the sprites doesnt animate trough).

    If i have my inventory (its more a book, filled with sprites on their right place (but arent visible if you didnt found it)), and each sprite is placed on its final position. Would there be an easy way to synchronize the sprites with the corresponding spirtes i would place in the game?

    Better description:

    Like you know - the player has to follow footsteps on the ground. sometimes there are some symbols you can collect (new). If you collect this symbols - the corresponding one will appear in my inventory book. You cant remove them or use them. See them more as "achievements".

    Update: Ive created two Main Sprites with the exact same items on each animation frame. Now i would have to compare this two sprites, if i found the ingame sprite(or better symbol), and make it visible in my inventory book. The reason why i created two main sprites is that ive a trigger in the center of my screen which is colliding with this sprite objects. If youre pressing a button on the screen to open the book, only the layer gets invisible...so the colliders would still active, and the elements in the book gets removed. This causes many errors. So now i have to synchronize this two main sprites with each other. If i find for excample a symbol which is on the animationframe 5 slot, the symbol on the animationframe 5 in my inventory book should be visible.

    I know its maybe difficould to understand. But i hope you guys know how to do this!

    Thanks a lot - and if you need some more informations or a better description please write!

    Best regards!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Kyatric 99Instances2Go and again thank you for your detailed explanations! Now i can understand the usage of this topic. I was asking, because i was importing all the sprites as own sprite object. But now iam using this kind of technic. It looks much more clear now. And if there are so many advantages...... lets go!

    So today i will try to make my inventar working. When its done i would may send you my capx. file

    Thank you very much for your help!

Congrats2u's avatar

Congrats2u

Member since 3 Jun, 2016

None one is following Congrats2u yet!

Trophy Case

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

Progress

11/44
How to earn trophies