oravalag's Recent Forum Activity

  • When calling an event sheet function from a script, is it possible to await for the function to finish and return a value?

    Otherwise, is there any way to wait for an event sheet function to finish? e.g. using runtime.addEventListener

  • It took me days to get just the right combination, so I don't remember enough details to put together a detailed instruction list. I can tell you what to search for in Google, though.

    1) The first thing that you need to do is get your cert accepted by your OS to the point that

    https://localhost<someport>:<somefile>[/code:2oans5ex]
    
    results in the little green lock appearing next to the URL in Chrome. In MacOS this involves Keychain. In one of the previous posts, there is a video explaining how to do it for Windows. It's painful, and really Chrome is causing us headaches for no good reason, but it is doable.
    
    2) You're going to have to get a web server running on localhost that actually supports CORS. Older webservers like Tomcat don't properly support CORS. Find a new one that either lets you specify the content of the HTTP header, or actually supports CORS properly. nGinx allows you to customize the HTTP header returned for HTTP Requests. That's how I finally got it working.
    

    Thank you tgenedavis! And blackhornet... i skipped that video and it was a good starting point.

    I finally managed to setup my https local server on Windows 10. I'll try to write a better tutorial when I have the time, but here's a general step-by step guide in case someone finds it useful:

    • Follow the instructions in the video linked by blackhornet to generate a pfx certificate:
      Subscribe to Construct videos now
    • Add the .pfx certificate to Google Chrome (settings->manage certificates->add certificate under the trusted root blabla... tab)
    • When you reload, it won't accept it yet. Here comes the trick. Press CRTL+SHIFT+i and select the "security" tab, where the lock icon is present. This icon is mentioned in a lot of tutorials out there but its location changed in the latest versions of Chrome. Select "view certificate" and under the "details" tab select the "export certificate" option and PKCS format (https://stackoverflow.com/a/15076602)
    • Now add that .PKCS certificate to chrome as you did before with the .pfx, and restart Chrome.
    • If you are using Internet Information Services (IIS) as instructed in the video, open it and under "Sites" add a new one for your local c3 addons server. Under configuration, select "Directory Browsing" press "Enable". (https://support.microsoft.com/en-us/hel ... .0-webpage)
    • Finally, enable CORS by modifying your web.config, which is in the directory you set when you added a new site in IIS, so the file looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <directoryBrowse enabled="true" />
            <httpProtocol>
            	<customHeaders>
    		       	<add name="Access-Control-Allow-Origin" value="*" />
    	     	</customHeaders>
            </httpProtocol>
        </system.webServer>
    </configuration>[/code:2oans5ex]
    [ul]
    	[li]And that's it! You should be able not to access your [url=https://localhost]https://localhost[/url]:[PORT]  <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">[/li]
    [/ul]
  • I seem to have got past most of the addon test mode issues on MacOS by using homebrew's nginx, and ssl using a keychain generated self signed key that is customized to include the subjectaltnam and authorized for ssl in the keychain. There was some tweaking of the nginx.conf file to contain the proper CORS http headers. If you don't have your self signed cert completely authenticated in Keychain, you won't even see responses sent back from the localhost web server when requested by C3. Also, port's nginx doesn't even install, so avoid that.

    It sounds more painful than it was.

    Is there any chance you could share some more detailed tips on how to do this? I've tried with no luck in Windows with a python server I found, also with XAMPP... in both cases using a self-signed certificate. Chrome keeps not-accepting the certificate so I haven't been able to load addons.

    I can try on MacOS if it worked for you, so any details about your configuration would be very much appreciated

  • Hi Ashley,

    The new function feature is awesome, but I found an annoying bug... when I pass the function a variable as a parameter, it crashes.

    This simple 2-lines .capx shows the problem. I'm sure it will be pretty easy to fix, maybe a r109b release? <img src="smileys/smiley2.gif" border="0" align="middle">

    https://skydrive.live.com/redir?resid=EA6D2E6BFF35AC87!112&authkey=!ABHEG_Ww4MxL0Yk

  • The background looks awesome... is it made of two layers?

  • Totally works. Dude you just went above and beyond! I really can't thank you enough. You are definitely going in the credits :D!

    Really, thanks so much again! <img src="smileys/smiley32.gif" border="0" align="middle" />

    I'm glad I could help <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Here's a possible solution:

    https://skydrive.live.com/redir?resid=EA6D2E6BFF35AC87!111&authkey=!AC-bkLJt6FM5rK4

    I think it's easier to spawn an enemy at a random point, check if it's overlapping a solid object -here you could make an "or" block or create a family from all solid objects- and if it does, discard it (that is, destroy it)

    I don't know if you can check collisions right when the object is created.

    Hope it helps!

  • Hi Ashley, are you planning to fix this any time soon? I use groups a lot as my game grows in complexity and it's a bit frustrating having to go through all my enable/disable actions every time I change a group's name...

    Not that it's a big inconvenience, but I'd be happy to know it will be fixed any time soon <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Since I updated to 103.2 C2 keeps crashing randomly but often when doing things such as creating new animations or closing the program.

    It can't be a project's issue, it happens even with recently created ones.

    It's driving me crazy, any ideas? Is anyone else experiencing the same issue? <img src="smileys/smiley19.gif" border="0" align="middle" />

    Edit: I disabled Windows 7 compatibility mode (I'm using Windows 8 RTM) and it stopped crashing <img src="smileys/smiley1.gif" border="0" align="middle" />

  • When you say "specific but random" points, do you mean...

    * having a certain number of static "spawning points" and choosing one of them, or

    * spawning objects on random points but meeting a set of conditions?

  • Hello wtfstudios,

    If you have the full version of Construct 2, you can use families, i.e. put your random objects into a "Family 1" and then spawn a "Family 1" object.

    Take a look at this capx ;) Hope it helps

    http://sdrv.ms/Q0bVd7

  • Here's one way to do it:

    DragDelay.capx (r101)

    You could probably use the Drag&Drop behaviour if you want, but I prefer just using events. Hope it helps!

    Thank you Nimtrix, that was helpful. I was trying something different, though. I'd like to enable the drag&drop behavior when the "clicking timer" finishes, but not having to click again to start dragging the object.

    Your solution works without using drag&drop, but if you move the mouse too quickly it grabs a different Sprite... any ideas?

oravalag's avatar

oravalag

Early Adopter

Member since 9 Aug, 2012

None one is following oravalag yet!

Trophy Case

  • 12-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies