Allardje's Forum Posts

  • Hi Yall,

    I'm having a little issue here.

    My situation is the following:

    • I have sounds named:
    • Animal1
    • Animal2
    • Animal3 etc..

    Once going to a layout it has pick one of the sounds listed above.

    There is a button you can click to play that sound.

    Once the sound is over it has to be saved in a Webstorage so we know that the sound is played before. As far as my concern i think i would have to save it as:

    Webstorage > Set local value "Animal1" = 1.

    So it should:

    Start of layout > Select sound ( between animal1, animal2, animal3 ) where Webstorage "animal1/animal2/animal3" = 0

    "for this example sound 2 ( animal2 ) is selected"

    Click on button > Selected sound will play

    On sound ended > Set webstorage "animal2" = 1

    So the next time it should be:

    Start of layout > Select sound ( between animal1, animal3 ) where Webstorage "animal1/animal3" = 0

    "as you see sound 2 is done and will never be selected again"

    The point that i can't fix is selecting the sound on random order, but only if the webstorage for that sound is "0".

    Any help in the right direction would be lovely!

    Thanks in advance!

  • Thanks for your reply!

    I did not use tags but after reading your reply i did have the idea to name the files as in: categorylevel1, categorylevel2

    Now i can use global variables "category" to set the category, and level"currentLevel" for the current level!

    Thanks for the hint!

  • Hi yall,

    I am with a little issue here.

    As active followers of the forum will notice is that i post pretty much "How do i...?" threads.

    I am doing that because i want to learn how to do some steps the right way and not my way ( which is mostly very unclean ! )

    As for this item i have a level select area.

    Let say:

    Level 1

    Level 2

    Level 3

    Each level contains a play button. Each play button has it's own sound. By clicking the play button the right sound has to play.

    Yes, it "sounds" ( no pun intended ) fairly easy but the only way i can be thinking of is like:

    Somehow i have the feeling that is NOT the way to do it since i have 100+ different levels..

    Please enlighten me !

    Thanks in advance!

  • Thanks Ash, i indeed did read that but to be fairly honest, i have no clue how much KB a webstorage takes in.

    My guess was that a simple webstorage like "Yes = 1" would take no more than like 1KB each. Ofcourse i could be wrong but i have no idea how to measure that.

  • Alright! Thanks for your answer !

  • Thanks for your reply.

    So if i'm correct you are saying:

    Webstorage > Set value "level1" = 1 (x1000 as for level 2, level 3 etc.)

    No problemo?

    Keep in mind that the whole game will be designed for Android ( don't know if this makes any changes ).

  • Hi Yall,

    I am creating a game where you can unlock 100's if not 1000's of things.

    The way i know how to save it ( Android ) is using webstorage.

    Though i am very curious if there is anything i have to keep in mind using webstorage? Is there a limit i should use? Could i just save 1000's of things?

    As far as i know i am saving things like:

    Level 1

    • Level 1.1.1
    • Level 1.1.2
    • Level 1.1.3
    • Level 1.2.1

    And that for 100's of levels.

    Just before i go trough all the hassle i want to be sure that i can use webstorage like that or if there is any method i should use.

    Thanks in advance!

  • Hi Guys i found out i have one more question.

    After this i still don't know how to create random letters.

    Well, i know how to create random letters but i don't know how to make sure the letters are included that are needed to create the answer.

    Can any one help me out with that one?

    As seen in the image on my first post ( the A,W,A,A,A,A,A,A,A buttons ).

    I will take the word "Construct" for example again.

    I have 18 Letters/Buttons. These letters have to be random but the letters C,O,N,S,T,R,U,C,T have to be included in those letters.

    So in this case i need the letters construct and 9 other random letters ( A to Z ).

    The letters construct is actually a global variable.

    Sorry for all these questions but i am pretty noob at that kind of things !

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow guys thanks! Both work like a charm!

    I got so many more things to learn!

    Great thanks!

  • Hi Yall!

    I have a question.

    As seen in very much games lately i am trying to create a answer system.

    I have done this before with a complete keyboard that works fine but this time i want to make it different.

    I want to give the person some random letters mixed with letters you can use for the answer.

    Now, i want to create a x amount of objects because i want to show the length of the answer.

    Example:

    Now, the little empty spaces in the image should be the amount of the answer.

    So if i have a answer "Construct" i need to create 9 of those objects.

    And if that isn't enough they need to be perfectly centered.

    Can any one help me with the best technique to do this?

    Thanks in advance!

  • Hi Yall!

    So some 1 requested me a very simple yet unknown app.

    This app only needs to be able to:

    1. Use a phone camera to shoot a video

    2. Play the video back a few seconds later.

    Now, i am not sure if i can do this with Construct 2.

    I am talking about Android.

    I did check out the "UserMedia" object but i am not sure what i am doing !

    So basically the question here is, is this possible to create with Construct 2?

    Thanks in advance!

  • Hi all thanks for your solution, i got it working with OddConfection's method.

    Yet i got a little small question, is it possible to make a sine behavior smooth?

    I got a sine behavior on my char but it moves in almost like steps. Goes smooth to the left, back to center, waits a few milliseconds, smooth to right, smooth to center etc.

    Any idea how i can get this in a flow? Vertical is working smooth but horizontal isn't !

  • OddConfection

    That worked like a charm!

    Thanks alot!

  • Hi !

    Thanks for your reply,

    I forgot to mention one thing. Is has to be on a single tap. Not if it is touching.

    So your idea works i got that working to before but it really is "on tap".

    Sorry for not mentioning it.

  • Hi all,

    I feel really stupid for this question that i can not fix it.

    I have a object in the middle of the screen. I want to move it to the touched postion.

    Once on that position stop.

    Thats it. Somehow i can't fix it xD..!

    It is a must that the object does not rotate it's angle. It really is as simple as moving left or moving right in a straight line and stopping at the position touched.