ramones's Recent Forum Activity

  • You have the array format wrong. Download your array2 as json and compare.

  • Do you want to just use the value of the variable or do you want to change the variable in the code? If you just need the value then you include it in the string the way you normally include a variable in a string:

    Browser: Execute javascript "some javascript code" & playerPoints & "more js code"

  • Event 11: You stop the ship moving when it's close to the target.

  • Seems it's only on the first tick that it doesn't calculate all the paths. If you add a little delay it works.

    I think pathfinding can have some anomalies when run at start of layout - like it can take 1 tick to update the obstacle map when changing layouts.

  • There's an example of counting up to a valuein x seconds. I suppose you could use the timer behavior now.

  • Set angle of motion to angle(self.x, self.y, player.x, player.y).

  • Browser.ExecJS("(function() {
      var text = '{""name"":""John Johnson"",""street"":""Oslo West 16"",""phone"":""555 1234567""}';
      var reference = JSON.parse(text);
      return reference.street;
    }());")[/code:vjk4iwxi]
  • Ok looking at the bird following events: the first two things that stand out are what codah already mentioned. No need to have everything under an 'Every tick' condition because the events run every tick anyway by default. And events 10/11 I guess were a copy/paste error.

    Then, there's no need to use the system pick conditions when there is a sprite picking condition that does the same thing. For example, you use both 'GoodWing: Is PickedUp' and 'System: Pick GoodWing by evaluating GoodWing.pickedUp' conditions that both do the same thing but the first is more readable. Also, 'System: Pick GoodWing where GoodWing.lineNum = 0' could be just 'GoodWing: lineNum = 0' (Sprite: Compare instance variable).

    All the GoodWing picking events have an 'Is pickedUp' condition, so you can take that out and move it up the top below the 'else' as it applies to all sub-events.

    And finally for the looping, instead of looping PickedCount times and keeping track of an index and so on, you could use 'System: For each (ordered)' to loop through each GoodWing ordered by lineNum.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I believe it's on the TODO list.

    [attachment=0:8lffszft][/attachment:8lffszft]

  • The sprites aren't properly created until the event that calls the function finishes. The sprite count IS updated immediately... but you can't access sprite.count if no sprite exists.

  • Sprite.Count will return 0 if there are no existing Sprites. You can't call an expression (.Count) on a Sprite object if there aren't any Sprite objects. It would be like using Sprite.X or Sprite.Width when no Sprites exist. It would just return 0.

    So after the function call where the objects don't exist yet, then there is no object to call object.count on. But if you had at least 1 object already on the layout then it would work.

ramones's avatar

ramones

Member since 17 Apr, 2012

Twitter
ramones has 4 followers

Trophy Case

  • 12-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

15/44
How to earn trophies