oosyrag's Forum Posts

  • Use an invisible helper sprite with the scroll to behavior rather than using scroll to on the player himself. Position the invisible sprite a set distance above the player (or however you would like the camera to behave) every tick.

    EDIT: Or just use the scroll to x,y system action every tick instead of the behavior. Then you can use player.x, player.y+distance for your coordinates.

  • Anyway, I'm sure there has to be a way to allow exported projects to request not only https URL's but also http URL's. By default, http are blocked.

    It should be a setting on your host rather than anything you do in your project.

  • > If you want AJAX requests to your server to work from any domain, or in preview, you can configure it to send the following HTTP header:

    >

    > Access-Control-Allow-Origin: *

    >

    You can add this in preview now!? How does one go about setting this?

    From what I understand, it is a server/host side setting that can be configured into your web service (apache). Basically it means, from your server's point of view, that if a website or program that ISN'T on the same server requests a file, that it is OK to send it.

    When you preview, your domain is basically local host, which is a different domain than your web host at http://www.****.com. So your request won't go through by default, unless your web host is specifically configured to allow it.

  • Newts first method is the approach I would attempt, and as he mentioned it is not simple. Although I'm sure the performance would be significantly better than having 15000 objects loaded at once.

    I'm assuming that the player only sees a tiny fraction of the total 15000 tiles at any given time. You'll want to create those tiles at runtime within a set range around the player. The method of generation would probably be via an array containing tile coordinate and ID information, or from a seed.

    You may even be able to use exported data from a map built in program like Tiled, as isometric tile data is more or less the same as orthographic, just displayed differently.

  • Layer properties - set Parallax to 0,0, scale rate to 0.

    Make sure your HUD elements are on the top layer and top left of the layout where you see the dotted lines.

  • One possible general approach:

    Create a variable - movesRemaining

    Set movesRemaining to dice roll result

    Upon moving, if movesRemaining is not 0, subtract 1 from movesRemaining

  • You didn't follow what I said then.

    https://www.dropbox.com/s/r6phr3nl90rbq ... .capx?dl=0

  • Add this event

    If hp.remaining=0

    Set hp.max to hp.max+10

    Set hp.remaining to hp.max

    Set width to hp.remainig/hp.max*bg.width

  • Are your post/request URLs online? If so, it is probably a cross-domain issue.

    [quote:2mg5dmmw]Making AJAX requests cross-domain or in preview

    By default, browsers block AJAX requests across domains. This means, for example, a game on scirra.com can request other pages on scirra.com, but cannot request pages on facebook.com. This is an important security feature of web browsers (it is not specific to Construct 2 or its AJAX object).

    Also, when previewing in Construct 2 the game runs on localhost. This counts as a different domain to the rest of the internet, so typically AJAX requests to any web page will fail during preview, unless the server explicitly allows cross-domain requests.

    If you want AJAX requests to your server to work from any domain, or in preview, you can configure it to send the following HTTP header:

    Access-Control-Allow-Origin: *

    This will enable AJAX requests from any domain, but you should still be aware of the possible security implications of this. For more information on cross-domain requests see HTTP access control on MDN.

    If it is a local post/request, check your file pathing.

    [quote:2mg5dmmw]Using file paths correctly

    Never hard-code paths (such as using an action to write to a fixed file path like "C:\MyGame\MyFile.txt"). This unfriendly to users, and is often perceived as unprofessional, untidy, or filling the user's system with junk. Not only that but in many cases it simply will not work, since not all users have permission to read or write to folders outside of their user directory.

    It is tempting to solve this by writing files to the application's folder. However this also may not work; on many versions of Windows, the Program Files folder requires administrator permission to write to, although you can read from it.

    The solution is to write to the user's folder, which you almost certainly have write permission for. This is provided by the UserFolder expression. The correct way to determine a file path in the user's folder is like this:

    NWjs.UserFolder & "myfile.txt"

    If you only need to read files, and don't need to write them, you can safely use the application folder (NWjs.AppFolder) instead.

  • I haven't tried this myself, but maybe keep track of WindowWidth and WindowHeight in variables, then scroll accordingly if they change.

    Or maybe enable the scroll-to behavior on your text box upon activating it.

  • Check your other thread, see if that answers your question. ref:

  • Use scale inner or scale outer instead of letterbox scale.

  • Made a health bar example for another thread. Is this perhaps what you are looking for?

  • https://www.dropbox.com/s/2kqyjcxe1dd67 ... .capx?dl=0

    I would appreciate if you made an attempt before asking me to make it for you, or at least ask about what you didn't understand.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have no experience with the physics object myself, but the following seems relevant.

    [quote:3tk9cuv5]Create revolute joint

    Create limited revolute joint

    Hinge two physics objects together, so they can rotate freely as if connected by a pin. Limited revolute joints only allow rotation through a certain range of angles, like the clapper of a bell. An image point can also be specified to connect to a specific part of the object. Note that an image point of 0 specifies the center of gravity of the object - if you intend to connect to the object origin, use -1.