Asmodean's Forum Posts

  • Close in the Browser-object should work.

  • Ahh, clamp, yes that's the one, I knew there was one! I'm trying this:

    Pin offsetX: PlayerAnimations.Angle/40[/code:1smexmda]
    
    and I want to limit it so it doesn't shift the X too far if the angle of the player is too extreme, clamp will work okay?
    

    Yeap, I think it should.

  • Do you mean something like clamp?

    clamp(x, lower, upper)

    Return lower if x is less than lower, upper if x is greater than upper, else return x.

  • Dropbox deactivated it too. I don't know any other free option like dropbox or google. The only option I know is bitballon https://www.bitballoon.com/. It's free for small projects, but very easy to use. You can even test it without signing up.

  • What do you mean with sharing? Do you try to share a file, so other people can download it. Or do you want that other can play your games?

    Hosting your games on google drive, so that other can play it doesn't work anymore. Google deactivated that feature.

  • A timing event (like wait or every x seconds) doesn't work in a loop. A loop will be completed in 1. tick. So your 'every 1 second' will never happend. If you want to address to all instances you doesn't need a loop over all instances at all.

    I would do it like that:

    capx:

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

    If you wonder what 'Set position' do, try to disable it and put your player on a platform.

  • It shouldn't give you any error. I tried the download and it works fine for me. However I made a zip-file. That should not be necessary , because the capx is itself a zip-archive, so it's now a zip in a zip archive.

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

    Event 3 is 'compare two values' in System/General

    Event 5 and 6 are 'is between values' in System/General

    Event 6 is a subevent to event 5. Both events are or-blocks. Make two conditions, highlight the whole block and make a right click on it an choose 'make or-block'

  • The capx works for me. I put it up again maybe it's corrupt. Please try to download it again.

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

    If it doesn't work here this is how it looks like. Sprite has a ScrollTo and a 8Direction behavior:

  • If it doesn't bother you if the enemies are placed in random outside your viewport you have only to look which area you cannot see. The area you can see is called viewport. The area you cannot see is between the borders of the layout and the viewport. So you need the coordinates of the viewport and the size of the Layout. Luckiey Constrcut2 provides this. There are ViewportLeft, ViewportTop, ViewportRight, ViewportBottom, LayoutHeight, LayoutWidth.

    Now you have to calculate the area which you cannot see. You need a x and y position:

    0<x< viewportLeft or viewportRight<x<LayoutWidth

    0<y<vieportTop or viewportBottom<x<LayoutHeight.

    Now you have the coordinates to spawn an enemy which is not created in the viewport. I made a litte example maybe it's easier to understand.

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

  • Zebbi

    https://www.scirra.com/manual/66/projects

    The properties for a project can be edited in the Properties Bar after selecting the name of the project in the Project Bar, or using the Project Properties shortcut in Layout Properties.

    Preview effects

    Whether or not to display effects and blend modes in the Layout View. If enabled, WebGL must also be enabled for the effects to appear. If disabled, WebGL effects are not rendered in the editor, and all objects are drawn as if they have Normal blend mode.

  • I don't know which Windows version you have. In Windows 7 you can turn this behavior off in the control panel, mouse properties. In the tab 'pointer options' check off 'automatically move pointer to the default button in a dialog box'.

    Now the irritating mouse behavior should be gone.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe I understand this wrong but you can simply load a new image for your sprite in the sprite editor.

  • You will have a little experience in php to get this work. However to load a xml-file from a server:

    You have to put a php-file and the xml-file on your server.

    myphpfile:

    <?php
    header('Access-Control-Allow-Origin: *');
    $str = file_get_contents('myxmlfile.xml');
    echo $str;
    ?>
    [/code:5hl2n2i3]
    
    in C2:
    [code:5hl2n2i3]
    System| On start of layout-> Request "http://myserver.com/myphpfile.php"  (tag"getxmlfile")
    AJAX| On  "getxmlfile" completed -> Load XML document from string AJAX.LastData
    [/code:5hl2n2i3]
    
    Now after you loaded your xml-string in the Construct2 XML-Object and can parse it or do what you want.
  • The example doesn't work ,because there is an access violation. Only the access from one specific server is allowed. You can see it yourself if you press F12 in your browser(Chrome, FireFox) an look at the console.

    You have to use your one sever with php to test the example.

  • Ah, now it makes sense. Thanks blackhornet for the explanation.