oosyrag's Recent Forum Activity

  • https://www.scirra.com/manual/124/system-conditions

    [quote:1yn1gpzj]Pick Nth instance

    Pick the instance at a given place in the internal list of picked objects. This is most useful used in sub-events to act on separate instances. For example, in a "Sprite collided with Sprite" event, Pick 0th instance and Pick 1st instance can be used to act on each instance involved in the collision separately.

    If all objects are currently picked, this condition can also be used to pick an object by its index ID (IID). For more information, see common features.

    After picking the 0th instance (oldest), you action (destroy) will then only apply to that instance.

  • I don't think three is anything built in. What would be your usage?

    Actually I would probably have a seperate dedicated semi transparent sprite with angle markers I would use as a reference for ranges when doing level design. Just drag it around to wherever i need it and destroy on start of layout.

  • How do you want them to spawn then? You can position them however you want after creating them.

    One way is to move at angle, for example 20 pixels at random(360) degrees.

  • You can add an animation frame to your character for debugging purposes only. Just replace the character sprite on that frame with a circle with width/height of range*2. Similar idea if you want a cone.

  • System-repeat.

    ceil(random(5)) is the expression for how many times to repeat. Ceil() rounds up.

  • Sorry about that, it should be repeat tokencount(AJAX.LastData,newline).

  • Use a global variable to keep track of total stars collected. For example lets call it TotalStars.

    On star collected - (System Actions) Add 1 to TotalStars.

    Then to display, you can use a text or spritefont object to set text to TotalStars.

  • On Asteroid Destroyed

    Repeat ceil(random(5)) times - Spawn Minerals

  • Mind if I refer to your server in a tutorial? This seems like a fairly common question, and useful as well.

  • Is there a way to use the min/max() expressions in a situation where the number of values to evaluate is not predetermined?

    My current workaround is to push the set of values into an array, sort, then get the front or back value. I was wondering if there were any different methods.

  • Responding to PM from CBelle requesting clarification here for the benefit of others.

    AJAX is not just for images. By using the "Request project file" action, you can load the contents of your previously imported project file to memory. This is accessible through the AJAX.LastData expression.

    With the conditions "AJAX on completed" and "repeat tokencount(AJAX.LastData,newline) times", you can loop through your text file and get each word with the expression "tokenat(AJAX.LastData,loopindex,newline)". Normally you would store each word in an array or dictionary, but if you want to put it directly in a list object you can do that as well by using the list's "Add item" action.

    Edit: fixed tokencount expression

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have each word on its own line in a text file.

    Add your text file as a "Project File". https://www.scirra.com/manual/141/files

    Request the file using AJAX. https://www.scirra.com/manual/107/ajax

    Parse out the words with the tokenat expression in a loop. Your source is "AJAX.LastData", your index is "loopindex", and your token is "newline" https://www.scirra.com/manual/126/system-expressions

    Store in your data structure of choice, recommended array, or dictionary could work too. https://www.scirra.com/manual/108/array

    Edit: Alternatively, for more advanced control over categories or nested data, you can use the XML Plugin. https://www.scirra.com/manual/139/xml

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 39 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