oosyrag's Recent Forum Activity

  • Assuming your range indicator is a circle with diameter the same width of the sprite... your range, or distance from the tower to the edge of the circle, would be the radius of the circle - half the diameter. So set the width and height of the range indicator to 2*range and center it on your tower.

  • Your problem currently is using the "Wait" action, which basically breaks the normal flow of the event sheet.

    A loop will run to completion in one frame.

    A wait action will basically take what remains of the actions after it out of the current flow of events, and complete them at a later time.

    In your loop, there are no actions after your wait, so nothing happens. All four instances of your sound get played in the same frame.

    If you use waits, it is best to have all your actions in one event rather than a loop.

  • Try the manual entry.

    https://www.scirra.com/manual/149/function

    [quote:26dg0304]Returning values from functions

    Functions can also return a result. For example, a factorial function could calculate the mathematical result and return it. In an On function event, the return value can be set using the Set return value action.

    If the event was called using the Call function action, the returned value is afterwards available using the ReturnValue expression. Functions can also be called directly from an expression using the Call expression; in this case the return value is automatically returned as the result of the Call expression.

    And in case you are not familiar with what an expression is: https://www.scirra.com/manual/78/expressions

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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...

  • 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.

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 38 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies