Magistross's Forum Posts

  • You might want to fiddle with Array.indexOf, it returns the X-index of a given value (or -1 if not found). But the documentation isn't really clear on how it behaves with 3-D arrays.

  • Oh ! And the line will always hit the wall ? Then this should do the trick :

    X1 = FirstObject.X

    Y1 = FirstObject.Y

    X2 = Wall.X

    Y2 = FirstObject.Y + Tan(Angle(FirstObject.X, FirstObject.Y, SecondObject.X, SecondObject.Y)) * abs(FirstObject.X - Wall.X)

  • You wanted to draw a straight line between 3 points ? How is it possible ? (Unless the points are aligned, but that would be the same as drawing a line between 2 points)

    Did you mean 2 points but with only 3 known coordinates ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use two Draw Line action. One for point A to point B and another from B to C.

  • If regex confounds you, try a regular split instead with :

    tokenat(Text, Index, Separator)

    You can then remove unwanted characters with replace()

  • Oh yeah, "for each (ordered)", my mistake !

  • Somebody correct me if I'm wrong, but I don't think you can with a simple "pick expression".

    However, maybe you could use a "for each object", test one of its value, and use ascending/descending for min/max. Add your action to that loop, then add a "stop loop". That way, only the object with the minimum or maximum value will be affected.

  • You can use the new regex functionalities C2 offers !

    RegexMatchAt(Text.Text, "(?:"")(.+?)(?:"")", "g", index)

    Where index is the 0-based index of the element you want and Text.text your string to manipulate.

  • Since opacity is a percentage and your travel distance happens to be 100, simply setting the opacity every tick to the remaining distance as LittleStain mentionned should work nicely.

  • JSON can't be passed as a query string, unless serialized in the proper format. But you probably shouldn't do that for large objects, like big map arrays, since you will most likely exceed the request length limit.

  • shinkan

    The timer probably provides the easiest way of controling the movement speed, while still remaining fps independant.

    David Flook

    Lerping that way will provide a linear movement, since dt is somehow constant, so no speed fluctuation.

  • You can always use tiled backgrounds to represent lines and use them to create any kind of grid you want. All of this without any particular plugin, all done with events.

  • Yann

    Why does each letter need to be redrawn one at a time ? Wouldn't it be better to buffer the resulting bitmap and paste that in the canvas instead of pasting one letter at a time ?

  • Yep, but for that you need two sin behaviors. Set them with the same period and magnitude, but put an offset to the period of one of them. The offset should be 25% of the period or 75%, depending if you want clockwise or counter clockwise rotation.

  • Ashley

    Out of curiosity, is it in the TODO list to add XML manipulation to the current XML plugin ?