oosyrag's Forum Posts

  • Also you may want to use "On A pressed" instead "A is down", otherwise it will switch between the two every tick as long as you have A held down.

  • Add the condition "layer is visible" to the relevant events.

  • Loops should run to completion before the next frame is rendered, as far as I know. Not completely sure if functions have a special timing for when they are run, I assume the function just gets inserted wherever it was called.

  • Getting right into advanced array usage <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

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

    I've updated your capx with comments, let me know if there is anything you don't understand. The key points are that we want the cursor to follow the object based on its UID only instead of its position in the array (since that can change now chage), and also to update the CurrentSelection when the UID is in the "wrong" place after it's position in the array moves.

    I've also modified a few events to make them more compact, again with comments. Also want to emphasize there is nothing wrong with having more events - doing so can make a project more readable and easier to understand, especially if you were the one that put them together.

  • Only the "Wait" actions will allow events to complete out of order.

    https://www.scirra.com/tutorials/56/how ... ait-action

    To keep an event with "Wait" in it from activating every tick, add a "state flag"(a variable) that you check as a condition. Upon running the event, toggle the state flag to active, and after the wait action, toggle it back to finished. Have the event only run on the condition that the state is finished.

  • Wow ng.io has a pretty fantastic feature set. Thanks for these plugins! Time to experiment to see how best to use...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks armaldio, I have no experience creating plugins or working with JS directly, but I guess I can look into it.

    Are there any other ways to get time from a third party server rather than local system time?

  • Usually you can put all your input triggers in a group and enable/disable the group as you pause and unpause.

  • You need conditions to "pick" the instances your actions are applied to. By clicking greenf, you pick that greenf but bluef is not specified, so when you destroy bluef all instances of bluef are destroyed.

    You can add an additional condition bluef is overlapping greenf to pick the correct one to destroy.

    But in this case, it sounds like you should be using containers instead of families.

  • The event with Else will only run if the previous event did not run. Very useful for toggles.

    Invert is usually for picking like usual.

    For example, if you had is overlapping, and inverted is not overlapping, both these will run and the relevant actions applied to the objects that are or are not overlapping.

    If you had overlapping, then else, the else event would only run if nothing was overlapping. If anything was overlapping, the else event would not run.

  • I found this: https://www.npmjs.com/package/ntp-client and was wondering if there was a way to use it to process an NTP request directly from C2, either as a plugin or through the browser execJS. I have no idea what this involves though so I'm asking here.

  • Make the layer invisible while you work? Change the radius property to 0 and set it to 50 on start of layout? Just throwing some ideas out there, don't haveC2 in front of me right now.

  • Best is subjective... but Adobe Aftereffects is a fairly well known one. There are probably others more suitable for what you are trying to do. Depending on what you're trying to do.

  • Projectiles are difficult to code with the MP plugin because of the delay in creating and destroying objects.

    The workaround I've used is to sync an INVISIBLE authoritative projectile via the host, and have create a visible sprite on the peer side for local input prediction. When the invisible host projectile gets synced, the local visible projectile will smoothly correct its position. On the host side, the "true" projectile will spawn a little farther forward with lag compensation, and peers can do similarly with reverse lag compensation

    This works best for slow moving projectiles. The difference in speed/angles upon spawning and catching up to the authoritative marker should be difficult to notice if done well.

    Basically, this is a recreation of the lag compensation and local input prediction systems for movement already baked into the MP plugin, except for the purpose of creating and destroying objects.

    For faster moving projectiles, this may not be ideal and it may just be best to show peers delayed, synced objects. This issue is not unique to the multiplayer plugin and is more an issue with netcode in general - you'll have to deal with the lag somehow in the end.

    If you don't care about an authoritative host, then you can just ignore the sync functionality all together, and have each peers update each other with messages. It will work as you described - the host will receive a message from the peer, and can relay a message to all peers with the contents and maybe a tag to identify which peer it comes from. This doesn't solve the lag issues though, which you'll still need to account for.

  • Made a capx for myself to help understand/visualize above approach, leaving it here.

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