Magistross's Forum Posts

  • Or go for some overkill expression :

    choose(Sprite.Angle = 0 ? choose(90, 180, 270) : 0, Sprite.Angle = 90 ? choose(0, 180, 270) : 90, Sprite.Angle = 180 ? choose(0, 90, 270) : 180, Sprite.Angle = 270 ? choose(0, 90, 180) : 270)

    <img src="smileys/smiley36.gif" border="0" align="middle" />

  • What we need is a sprite condition like "is (x,y) in collision polygon of object A" or a system condition like "is (x,y) solid".

  • Logical operators return 0 or 1, and this include the = operator (not "=="). So you could do it this way :

    First Value: Score % x = 0

    Comparison: =

    Second value: 1

  • But I highly doubt you'd end with something "complete" if you stick with the free version.

  • Yeah, and we oftentimes need someone else to point out the obvious !

    No problem, glad to help !

  • Use ABC1.Width and ABC1.Height instead of Array.Width and Array.Height.

  • "Every tick" is an implicit condition. Even if you don't have one, your conditions are evaluated every tick and actions are executed if the conditions are met. Just add a "on start of layout" or something above both your events. (You can also put all actions in the same event, no need to cycle your array twice.)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can't be worse than checking for collision for every unit every tick though ! <img src="smileys/smiley17.gif" border="0" align="middle" />

    In fact, if you use only a "sum of deltas" approach instead of checking for the exact distance, I think it would be much LESS expensive than collision checking. Wouldn't hurt to try ! <img src="smileys/smiley2.gif" border="0" align="middle" />

  • I remember you asked a similar question a few months back. You can use the same solution I proposed to you back then. A custom distance function, that scale the delta Y according to the ratio width / height of your ellipse.

    Here's an example.

  • Lolz ! I was wondering what you meant by "shaking violently" so I tried it. I laughed so hard when my "gun" started behaving like a fan ! <img src="smileys/smiley36.gif" border="0" align="middle" />

    Good thing you found a way around that issue though, because I don't know why it does that ! <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Supposing your image point is index 1, just set the angle of the gun to :

    angle(Gun.ImagePointX(1), Gun.ImagePointY(1), Mouse.x, Mouse.y)
  • To answer your first question, if you were to use the XML to check whetner or not some word exists, you could use "Compare two values" and check if XML.NodeCount("/dict[word='AB']/word") is greater than 0.

  • Yeah, as Yann said, the XML object cannot be used to create an in-memory XML document... I wonder why too !

    But nothing keeps you from writing your own XML string ! You could then output it as a file download using the FileSaver plugin.

  • AjaxLastData contains the integrality of your text file. You will have to parse it to retrieve the lines you want. I guess you could tokenize the data with the "newline" character (using tokenat). But it will be practicable only if you have one question per line. Otherwise you might want to take a look at XML.

  • I was destroying the wires because to me it didn't make any sense keeping them. The circuit would look like current could go through while in fact it doesn't... maybe junction should be able to be turned on and off in their capacity of distributing power !

    Anyway, unconnected wires are dangerous ! <img src="smileys/smiley36.gif" border="0" align="middle" />