grigrizljac's Forum Posts

  • It's in the exported index.html file, line 48–57. Removing this should remove the warning.

    	<script>
    	// Issue a warning if trying to preview an exported project on disk.
    	(function(){
    		// Check for running exported on file protocol
    		if (window.location.protocol.substr(0, 4) === "file")
    		{
    			alert("Exported games won't work until you upload them. (When running on the file:/// protocol, browsers block many features from working for security reasons.)");
    		}
    	})();
    	</script>[/code:38ihjkb8]
  • Rex's CSV2Array plugin may help you, but it is only available for C2, as far as I'm aware.

  • Hi, I want to get a webpage's HTML.

    I tried with AJAX Request URL (webpage's URL) and then get the page's HTML from AJAX.LastData. My problem is it does not always work, for example, it does work with

    AJAX Request: "http://www.nationalgeographic.com/"[/code:3640r9pw] but it does not work with [code:3640r9pw]AJAX Request: "http://www.scirra.com/"[/code:3640r9pw] Anyone got a clue?
    

    It's because that's what they've set on their servers.

    "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'yourIP:50000' is therefore not allowed access."

    If you set "Preview browser" to "NW.js", it will work because it will run as an app locally. Similar story will be present when exporting – I'm pretty sure if you export to HTML5 and upload to your server, it won't work. However, NW.js and Androdid export should work.

    When previewing in Chrome, there is one trick you could try – disabling this warning. Make sure only to use this when testing, not when browsing normally, because it could potentially be dangerous.

    If you open cmd at the install directory of Chrome and type in the following code, Chrome will open with the warning disabled:

    chrome.exe --disable-web-security --user-data-dir[/code:3640r9pw]
    (make sure you close all Chrome instances before that)
    
    After you're done with testing, closing all Chrome instances will revert Chrome back to normal mode.
  • + Asteroid: Is overlapping BulletLaser

    ----+ Asteroid: Pick top instance

    -----> Asteroid: Subtract random(?100?) from Hp

    -----> Asteroid: Subtract random(?100?) from Hp

    + Asteroid: Hp = 0

    -> Asteroid: Destroy

    // To add - for every -1000 hp of the asteroid make him drop loots

    + Asteroid: LootHp = 0

    -> System: Wait 0.01 seconds

    -> Player: Spawn PowerUpsHP on layer "HPbar" (image point 0)

    -> Asteroid: Set LootHp to 1000

    its not working whats wrong

    You're subtracting from Hp twice (I guess you should once from Hp and once from LootHp).

    One more thing is that you use "random" two times – so a different number will be subtracted from Hp than from LootHp.

  • If you have a page embeded in an iFrame and want to call it from parent, here's how:

    [event] | Browser.ExecuteJavascript 
    "var iframe = document.getElementById(""myframe"");
    if (iframe) {
       var iframeContent = (iframe.contentWindow || iframe.contentDocument);
         var doc = iframe.contentWindow.document;
    
    // Your code here
    
    }"[/code:1a2x6fsr]
    
    You place your js code there inside, just as you would normally.
    
    Also make sure your iFrame has an ID – in the upper example, the ID is "myframe".
  • You do not have permission to view this post

  • As far as I'm aware, it has to do with colour profiles. Chrome for Windows, for example, uses some colour profiles, which make look your sprites a bit different than they look in the editor. That might become a bit problematic when using ReplaceColour effect, because the output colour is different than you'd expect, hence the effect might not recolour your sprite.

    I hope you find the answer.

  • Nope, missing 3rd-patry plugins (so I can't open my c2 projects), free edition is not really useful, it is still in beta with many bugs and lacks of certain things. Also some keyboard shortcuts (ctrl + tab, ctrl + w, etc.) don't work. I don't really like the save system, I hope to see support for browsers to save to some local folder (which the user can select; one folder per webpage) in the future.

    Though I like the fact it is browser-based, as it pushes the limits of HTML5 forwards, which is great for HTML5 games.

  • Can confirm.

    Interestingly, when it disappears, if you press E again (before clicking anything), you get the dialog to bring the first one back.

  • Please note that plugins can malfunction badly on Android and, last time I checked, not supported by some export options. Careful, friend.

    From my tests, I have never had issues with plugins. If so, you can do it manually – you can get current time, save it to localstorage and compare it the next time.

  • I think that this plugin by Rex could help: http://c2rexplugins.weebly.com/rex_time_awayl.html

    You could also compare the last time and current time manually.

  • Maybe add an event

    Platform On Landed AND Key is down -> Simulate Jump[/code:33g77txv]
  • Which of them do I have to pick? It is on latter box scale.

    I usually pick Scale Outer. This way, if you set Window Size to, for example, 1080 x 700 but the device has screen of size 1080 x 720, the remaining 20 px will be filled with layout.

    Sometimes I also add a sprite to the centre of the layout and add Scroll To behaviour. This way, the layout expands all around the screen (and the centred elements stay centred) instead of only down and right (where I have to reposition them).

    Maybe experiment a bit, you will already see differences when running a preview in broser by resizing the browser.

  • Check in C2 in Project Properties under Full Screen in Browser. Playing with that will allow you to have the control over filling the borders.

  • The Colour Palette when editing a sprite is a useful thing. But I think it lacks of some functionality. It would be great if we could enter a hex value of a colour because it is often faster and easier than typing in red, green and blue values separately (for example when copying from other apps).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads