Sami424's Forum Posts

  • :) Tack

  • I think you can play the sound when "Touch End".

    If you want to calculate the speed(v).

    You have the distance(S) between 1st position to the last position.

    And the time of swipe by adding dt while touching(t).

    So you will have v = S / t.

    When touch end, you can compare the v with any number X and do the action.

    Cheers.

    Very good , thank you !!Maverick1912

    One thing tho, the game itself will not make the player end touch often, since you have to swipe alot in a circle, any tip on this to make a lasting slash sound effect?EDIT: I used Touch speed ,thanks for the help !

  • See this chapter from the manual:

    https://www.scirra.com/manual/83/variables

    Local variables are often used when you need a "temporary" variable in an event for some calculations. Note, that local variable is reset on the next tick, so if you use "Wait" in the event, the variable will be reset after it.

    If you need the variable to not reset, you can set it as Static. For example, you can create an event group Audio, add local static variable MusicVolume there. This variable will only be accessible inside the Audio group (which is good, because you don't need it anywhere else) and it will not be reset even if you reset all global variables.

    Thank you very much dop2000 that was very helpful

  • I need one more thing for my game, and its a swipe sound, what i mean is, how do i in the best way, add sound when a player swipes the screen, and how do i control how fast the swipe is? is this even possible?

    TO BE SHORT: Im trying to get a swish sound when swiping the screen , the object is a hammer that has a angle towards the touch, so basicly im trying to get the "swosh" sound from when the hammer moves to to another angle.

    any1 pls?

  • As the title says, just discovered that when i drag down the global variables to a group or single event it becomes a local one, ive worked with instance variables and global variables only, whats the difference with the local variables?

  • THis error also gives in c2 version of the plugin

    If its showing in c2 aswell than either your script is off or the plugin doesnt work, can u share ur example.capx

  • Here:

    https://drive.google.com/uc?export=download&id=1Ca0GzMF2F4v5zLWGHq9u7ka6LVorkeIb

    But I have absolute no clue if it works, I can install it but it needs cordova and it's for the C2 Runtime only. It's converted with the Plugin Converter from BlackHornet.

    This guy uploaded the QR plugin, install the .c3addon he uploaded and you just have to run it with c2 runtime. I have not made the example with HTML since it worked with the QR, just use c2 runtimes as i said, if u need help on how that works i can upload an example of the QR plugin on c3 but with c2 runtime.

  • Sami, your first decision is where you need or want to store that json data. Local storage is on the device, and AJAX is from a web server. To keep things simpler, I'd guess that you want to use only local storage for now, editing data and re-saving the json as needed.

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/local-storage

    thank you

  • If i do a dictionary file, .json, in c3, do i load it in with ajax, or can i use localstorage ? I mean since it doesnt load by itself right? right now im using ajax load dic.json then on loaded > load dictionary with the command ajax.lastdata ,

    is there a better way?

  • > Here:

    > drive.google.com/uc

    >

    > But I have absolute no clue if it works

    I added c3runtime. and I also don't know if it works.

    https://github.com/erenertugrul/construct-plugins/tree/master/ported_plugins/simple_qr_scanner

    i tried it, it works, nice job, tho c2 runtime only, but its better than nothing ! Just do as you did on c2, and run c2 runtime , it does not work with c3 runtime.

  • For anyone that is unsure to buy this, i was very unsure, i spent hours looking on chadis posts and i noticed how much effort was put in to this project, and the money is the least i can do, since i bought it, i have recieved all updates free, if you are a serious developer in construct 3 i highly recommend this plugin collection, its a 1 time fee for saving TONS of time, for me, this plugin collection makes construct 3 perfect, i did doubt it at first since c2 has tons of more addons, but seeing someone put in so much effort for others to save their time , i am sure C3 will have tons of more features, and im sure this pack will have tons of more features.

    This pack is worth the money, and you get a discount if you join their discord wich has support 24/7 , i bought it using discord and it took about 5 minutes.

    edit: i just had to make this post since ive read tons of haters that thinks its all about money. I respect game development and if you do, you do not expect that someone else codes all the plugins for you free, it does not make sense for me.

    Big up on this pack and keep on the good work, the latest firebase c3 runtime update was a life saver for me!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I tried to make it work without a camera for a few hours but it does not work. :(

    Its too fast or too slow or jumping.

    As workaround I created a camera with ScrollTo behavior and 8 direction movement, set to up/down. 1200 max speed, 5000 acceleration, 600 decel and just simulate up/down on swipe. Its not ideal cause it has a fixed speed (tried to use touch speed but did not work out; set speed=touchspeed moved it always to the right instead of down) but its "OK".

    Would be nice to know if someone has another solution.

    can you share your c3 project? or just the camera part, so i can do my thing and you might like it. I know it can be hard to get a nice effect.

  • > Moved to "How do I" forum. Sami424 - I don't think the question involved AJAX.

    yes this is not related to AJEX it is on Dictionary

    yeah im sorry i read it wrong, i use AJAX for array and my php files , but i did not know you could use the dictionary that easy, just tested it lol. saved me alot of time. thanks.

  • I will gladly contribute to get c3 in swedish.

  • hii everyone.

    i want to know how do i get key and its value when key is not known in dictionary and we also know that there is only one key.

    i am using for each loop but it is not working . i think i am doing some mistake but i don't know what.

    try to post in the "how do i?" part of the forum, you use ajax.lastdata to recieve what values are in your dictionary