oosyrag's Forum Posts

  • You may be overthinking it - try this https://www.dropbox.com/s/urj0lhkonwuix ... .capx?dl=0

    Cooldown system can be added separately, but in the example the sword sprite simply cannot be spawned if one already exists.

  • It works fine if you change it to On touched Sprite.

    Your project has a few other problems though:

    Your hammer position is set to touch.x, touch.y, which is always the first touch's position. You'll want that to be Touch.XAt(Touch.TouchCount-1) and Touch.YAt(Touch.TouchCount-1) to set it to the position of the LAST touched position.

    Also you are using Trigger once improperly. It should not be in a subevent. This can cause your event to break in certain cases, where the health can keep going below 0 and the sprite can never get destroyed again as the event will never run again.

  • loopindex*4

    instead of loopindex...

  • I'm not familiar with this topic myself, but Spriter may have the functionality you need.

    https://brashmonkey.com/

  • Access to your javascript file is denied. This is a web host/server setting. Is javascript enabled on your host?

    https://www.scirra.com/manual/168/mime-types

  • Simple, don't use the "tap" guessture, and instead use "is touching object" or "on touched object" instead.

  • Depending on your data structure, the dictionary object may be worth looking in to as well. You would have an instance of a dictionary for each set of words, and you would be able to use the "For Each Key" and "Has key" conditions to check for matches.

  • Any reason you're not using the 8 direction behavior? It should encompass everything you require. Set acceleration based on your stick axis value.

    If you want to do it yourself, from what I understand from your description, you're mostly doing it correctly. You'll need velocity and acceleration variables per axis (x and y I assume). Your input determines your acceleration. Every tick, your acceleration will be added to your velocity. For caps, you'll be using the max() and min() expressions. Given no input (else condition), you will need to subtract a set amount from velocity (or add, if it is already negative) towards 0, which represents deceleration/friction.

  • https://www.scirra.com/manual/131/common-conditions

    [quote:151ngzje]Pick nearest/furthest

    Pick the instance either nearest or furthest from a given position in the layout.

  • You would have to have each peer send a message with the relevant information to the host, and the host relay that message to peers. Use tags to facilitate logic to decide what gets sent to who.

    Generally speaking, such an approach will not solve your lag problem. On the other hand, if your project is for school only, your host and your peers should all be local, in which case the internet quality doesn't matter at all.

    If you don't have a good understanding of the difference between host, server, and signalling server, recommend going through the multiplayer tutorials again carefully, or you'll have bigger issues than just lag down the line.

  • https://www.scirra.com/manual/126/system-expressions

    [quote:3rssxxyz]CanvasSnapshot

    Contains the resulting image from a Snapshot canvas action after On canvas snapshot has run. (Note this expression is not available immediately after the Snapshot canvas action - you can only use it after On canvas snapshot triggers.) The expression returns a data URI of the image file. This can be loaded in to a Sprite or Tiled Background object via Load image from URL, sent to a server or stored locally, or opened with the Browser object in a new tab to save to disk.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You may want to set up custom events for movement and collisions if at all feasible. I've run into this issue before with pixel perfect blocks sliding up against each other where solids did not play nicely. Adjacent pixels count as colliding and solids will block each other.

    Although if anyone has any other ideas I'd be interested as well.

  • You probably have bullets being created every frame, or tick.

    Try adding an Every X Seconds condition to your bullet spawning event, or other condition to limit the rate that event fires.

    Remember the entire event sheet will run once per frame.

  • I think something got misunderstood here.

    This is as described in your image. The indicator is based on the x/y of the projectile, constrained to the viewport bounds. I think this isn't the end effect you are going for though...

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

    If you want an indicator to show where the object is expected to enter the viewport based on angle of motion, you'll need to raycast and see where the ray intercepts the viewport bound and as 99instacesgo suggests. There are ways to do this without plugins as well, but it is an intermediate-advanced task. https://www.scirra.com/tutorials/902/li ... raycasting

  • Generally the safest way is to include your file as a project file in your capx.

    Otherwise you need to have the server your file is located on specifically set up to allow cross domain ajax requests. Which is exactly what the manual entry describes.