zchggf's Recent Forum Activity

  • Well then i didn't know about that

    thank you for this tip MadSpy and mindfaQ that makes it a lot easier

  • Hey...

    As some of you may know since Construct 2 r206 Scirra team decided to disable Webstorage by default

    and use the new "Localstorage" instead

    which not only tricky to use but you have to do double as much events as you would do in Webstorage

    and i can't really find any benefits to use Localstorage over Webstorage.

    So after some looking around opening files and closing others i finally got it

    and guys this is how you enable Webstorage again

    OK so first of all you need to locate your installation directory

    it's probably in here "C:\Program Files\Construct 2" Please note that yours might be different

    then go to "exporters\html5\plugins" and scroll down till you find "webstorage"

    open it and you will find 4 files

    we will just edit "edittime.js" and just leave the rest alone

    once you right click "edittime.js" and selected "Edit" from the menu

    you will find this:

    I actually forget to save the old file so this is the final result

    function GetPluginSettings()
    {
    	return {
    		"name":	"WebStorage",
    		"id": "WebStorage",
    		"version":		"1.0",
    		"description": "Allows you to store data in the browser session and local storage.",
    		"author": "Zack0Wack0/Scirra",
    		"help url": "http://www.scirra.com/manual/120/webstorage",
    		"category": "Data & Storage",
    		"type": "object",
    		"rotatable": false,
    		"flags": pf_singleglobal
    	};
    }
    
    //////////////
    // Conditions
    AddCondition(0,cf_deprecated,"Local storage supported","Local","Local storage supported","Check if local storage is supported by the browser.","LocalStorageEnabled");
    
    AddCondition(1,cf_deprecated,"Session storage supported","Session","Session storage supported","Check if session storage is supported by the browser.","SessionStorageEnabled");
    
    AddStringParam("Key","Enter the name of the key to check.", "\"\"");
    AddCondition(3,0,"Local key exists","Local","Local key {0} exists","Check if a key exists in local storage.","LocalStorageExists");
    
    AddStringParam("Key","Enter the name of the key to check.", "\"\"");
    AddCondition(4,0,"Session key exists","Session","Session key {0} exists","Check if a key exists in session storage.","SessionStorageExists");
    
    AddCondition(5, cf_trigger, "On quota exceeded", "Storage", "On quota exceeded", "Triggered when the browser's limitations on how much data can be stored are exceeded.", "OnQuotaExceeded");
    
    AddStringParam("Key", "Enter the name of the key to retrieve. The value is treated as a string.");
    AddStringParam("Text to compare", "Enter the text to compare the value of the key to.");
    AddComboParamOption("Ignore case");
    AddComboParamOption("Case sensitive");
    AddComboParam("Case sensitivity", "Choose whether capital letters count as different to lowercase.  If ignoring case, \"ABC\" matches \"abc\".", 0);
    AddCondition(6, 0, "Compare key value (as text)", "Local", "Local key {0} is <b>{1}</b> <i>({2})</i>", "Retrieve the value of a key as a string, then compare it to some text.", "CompareKeyText");
    
    AddStringParam("Key", "Enter the name of the key to retrieve. The value is treated as a number.");
    AddCmpParam("Comparison", "Choose how to compare the value of the key.");
    AddNumberParam("Value", "Enter the value to compare to.");
    AddCondition(7, 0, "Compare key value (as number)", "Local", "Local key {0} {1} {2}", "Retrieve the value of a key as a number, then compare it.", "CompareKeyNumber");
    
    //////////////
    // Actions
    AddStringParam("Key","Enter the name of the key to associate the value with.", "\"\"");
    AddAnyTypeParam("Value","Enter the value to store.", "\"\"");
    AddAction(0,0,"Set local value","Local","Set local key {0} to {1}","Store a value in local storage (available in any session).","StoreLocal");
    
    AddStringParam("Key","Enter the name of the key to associate the value with.", "\"\"");
    AddAnyTypeParam("Value","Enter the value to store.", "\"\"");
    AddAction(1,0,"Set session value","Session","Set session key {0} to {1}","Store a value in session storage (only available in the current session).","StoreSession");
    
    AddStringParam("Key","Enter the name of the key to remove.", "\"\"");
    AddAction(2,0,"Remove local value","Local","Remove local key {0}","Remove a key from local storage.","RemoveLocal");
    
    AddStringParam("Key","Enter the name of the key to remove.", "\"\"");
    AddAction(3,0,"Remove session value","Session","Remove session key {0}","Remove a key from session storage.","RemoveSession");
    
    AddAction(4,0,"Clear local storage","Local","Clear local storage","Remove all local keys.","ClearLocal");
    AddAction(5,0,"Clear session storage","Session","Clear session storage","Remove all session keys.","ClearSession");
    
    AddStringParam("JSON", "A string of the JSON data to load.");
    AddComboParamOption("Set");
    AddComboParamOption("Merge");
    AddComboParam("Mode", "'Set' will clear local storage then add items.  'Merge' will add or overwrite items.");
    AddAction(6, 0, "Load JSON", "Local", "{1} local storage from JSON string <i>{0}</i>", "Load data in to local storage from a JSON string.", "JSONLoad");
    
    //////////////
    // Expressions
    AddStringParam("Key", "Key name", "\"\"");
    AddExpression(0,ef_return_string,"Get local value","Local","LocalValue","Get the value from a key in local storage.");
    
    AddStringParam("Key", "Key name", "\"\"");
    AddExpression(1,ef_return_string,"Get session value","Session","SessionValue","Get the value from a key in session storage.");
    
    AddExpression(2,ef_return_number,"Get number of local values","Local","LocalCount","Get the number of keys in local storage.");
    AddExpression(3,ef_return_number,"Get number of session values","Session","SessionCount","Get the number of keys in session storage.");
    
    AddNumberParam("Index", "Index", "0");
    AddExpression(4,ef_return_string,"Get Nth local value", "Local", "LocalAt", "Get the value stored in the Nth local key.");
    
    AddNumberParam("Index", "Index", "0");
    AddExpression(5,ef_return_string,"Get Nth session value", "Session", "SessionAt", "Get the value stored in the Nth session key.");
    
    AddNumberParam("Index", "Index", "0");
    AddExpression(6,ef_return_string,"Get Nth local key name", "Local", "LocalKeyAt", "Get the Nth local key's name.");
    
    AddNumberParam("Index", "Index", "0");
    AddExpression(7,ef_return_string,"Get Nth session key name", "Session", "SessionKeyAt", "Get the Nth session key's name.");
    
    AddExpression(8, ef_return_string, "Get as JSON", "Local", "AsJSON", "Return the contents of all local storage in JSON format.");
    
    ACESDone();
    
    var property_list = [
    ];
    
    function CreateIDEObjectType()
    {
    	return new IDEObjectType();
    }
    
    function IDEObjectType()
    {
    	assert2(this instanceof arguments.callee,"Constructor called as a function");
    }
    
    IDEObjectType.prototype.CreateInstance = function(instance)
    {
    	return new IDEInstance(instance, this);
    }
    
    function IDEInstance(instance, type)
    {
    	assert2(this instanceof arguments.callee,"Constructor called as a function");
    	
    	this.instance = instance;
    	this.type = type;
    	
    	this.properties = {};
    	
    	for(property in property_list)
    		this.properties[property.name] = property.initial_value;
    }
    
    IDEInstance.prototype.OnCreate = function()
    {
    }
    
    IDEInstance.prototype.OnPropertyChanged = function(property_name)
    {
    }
    
    IDEInstance.prototype.Draw = function(renderer)
    {
    }
    
    IDEInstance.prototype.OnRendererReleased = function()
    {
    }[/code:1ep9byyq]
    
    so you will find [code:1ep9byyq]"flags": pf_singleglobal[/code:1ep9byyq]
    
    is a bit different
    
    so what ever is after flags just replace it with [code:1ep9byyq]pf_singleglobal[/code:1ep9byyq]
    so final result should be exactly the same as above or as this in here
    
    [code:1ep9byyq]"flags": pf_singleglobal[/code:1ep9byyq]
    
    [i][b]and just leave everything alone don't change anything else[/b][/i]
    
    and just save the file and that's it
    
    please note that if you have any problem saving the file just save anywhere else on your Desktop for example
    and then replace the original file with the new one you have just created.
    
    and another thing is English is not my Native language
    so don't blame me if you saw something weird
    
    that's it for today if you guys have any questions feel free to leave them down below
    and good bye.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi

    I think the question is so simple

    i want the player to be on the up,down.left or right of the window and not just in the middle

    and i know how to do that i just want to compare angels of the mouse

    so if the mouse is on the left do something

    if the mouse is on the right do another thing etc...

    but the funny part is i know i should use "is between angels" but i cant get the right angels

    by the way i am not totally embarrassed right now

  • Everything you need:

    YES, Thank You Man You Helped Me a lot

  • Something like this?Comes from this topic I found while using the search on this forum with the words "swipe scroll"

    Yeah but it's gonna be better if there is actual scroll bar and right now it's endless and i don't want that

    i want to have an a beginning and ending position with the animation that i told you before

  • >

    > > I can't open your html file, but if you explain a little better what it is you'd exactly like, I might be able to help..

    > >

    >

    > just download it and right click > open with > Google Chrome or what ever do you have

    >

    No, thanks..

    I'd rather just hear a better explanation, but good luck!

    I simply wanna make an upgrade menu with scroll bar because i am very limited in space

    so there should be a stylish scroll bar on the right as well as down of this menu

    and it's better to have some kind of animation for example if you browse your apps in your smartphone

    and you just swipe up and down the menu gonna move fast and then go slower and slower until it finished the list of apps

    and the speed should be different every time depending on your swipe power

    and if you continue to swipe even after the list finished still gonna do the same but slower and if you leave you finger it's gonna get back to the end very fast and getting slower

    if you didn't get it just open your smartphone's apps list and you will know what i am trying to say

  • I can't open your html file, but if you explain a little better what it is you'd exactly like, I might be able to help..

    just download it and right click > open with > Google Chrome or what ever do you have

  • Plz Help !!!

    How Can I Add Bullets To The Stock From The Event Sheet ????

    I Can't Seem To Find It

    OK,I Can Add Bullets To The Clip But Not The Stock

    Any Idea ?????

  • Hi

    I am trying to make a scroll bar

    something similar to this

    dropbox(Dot Com)/s/j0alckwgyb2dxas/index.html?dl=0

    but for some reason i can't

    and No i am not going to use the list menu because the design is so terrible

    as will as this is not what i want to do

    i don't actually know how to explain it to you guys but i just want something similar to the example above

    just download the html file and run it on your browser and you will get it

  • Just implemented a similar feature.

    Put a layer on top set the color to Black and add effect "saturation" . When Pause is active set layer Black to visible, everything under will be in gray.

    Thank You It Works !!!

  • Hi

    I was hopping if anyone can help me

    i want to make a pause menu and while it's pausing the screen should be turned to black and white

    i am almost done i finished the pause menu but how to make the screen looks black and white ???

    is there is any effect that can do that ???

    also if someone actually posted any effect that could help please tell me about it.

  • As grigrizljac told you but if you want to upload your game as HTML 5

    this is may not work after exporting

zchggf's avatar

zchggf

Member since 12 Jan, 2015

None one is following zchggf yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies