Magistross's Forum Posts

  • zatyka

    Of course, repeated AJAX requests is out of question. But syncing the game clock only once upon loading is not really helping to validate a timed high-score. You need two requests, for starting time, and ending time... so twice the latency. Depending on the game need, it might not be an option.

    I guess combining both external and internal validation methods could work too. Compare external time with in-game time, and if results are too far apart (latency excluded), reject the high-score.

  • I don't think you need to fetch the real time from a remote server to actually prevent cheating. And for a time based game, the latency caused by the process of retrieving time from an external source usually is a no go.

    Best to stick to tickcount and "dt count"... Not cheat-proof, but anyway, what is cheat-proof nowadays ? <img src="smileys/smiley36.gif" border="0" align="middle" />

  • Look at system expressions under Time. tickcount gives you the number of ticks since the beginning of the game. You could also simply keep your own tick count in a global variable that get incremented every tick you want.

    If you prefer to get a real "time" and not just tick count, use time instead of tickcount or keep a count of all dt in a global variable.

  • I would have missed this glorious example if not for bilgekaan bump.

    So thanks bilgekaan ! <img src="smileys/smiley9.gif" border="0" align="middle" />

  • Check the condition of your "Sprite2". There is one named "Is between angles" under the Angle group.

  • Check if the angle of the gun is between 90 and 270. If so, set your sprite to the "mirrored" state. "Not mirrored" state otherwise.

  • I don't think there is any "easy" way to accomplish what you want. But you got me curious so I had to try. Here's what I obtained.

  • The FunctionExt might have been able to help you achieve what you wanted. But hey, writing your own plugin certainly felt more rewarding ! <img src="smileys/smiley2.gif" border="0" align="middle">

  • I cooked something in a hurry there.

  • For each tree, pick the smallest relative distance between the woodcutter by using a modified dy (assuming the major axis of your ellipse is on the x axis).

    Modified dy = (Woodcutter.Y - Tree.Y) * Ellipse.Width / Ellipse.Height

    Distance = (dx^2 + dy^2)^-2

    You could even just pick the smallest of the Abs(dx) + Abs(dy), since the actual distance value is not really needed.

    A function returning the UID of the closest tree would work great !

  • You might to check these plugins before switching back to Excel !

    FileSaver

    FileReader

  • Hmmm, I think I misunderstood what you wanted. You want your whole loop to trigger only once. When do you want it to fire, on the start of the layout ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you want to stop the loop as soon as one spawning event has occured ? If so, remove the "Trigger once" and add a "Stop loop" action.

  • Hi Zoglu ! <img src="smileys/smiley1.gif" border="0" align="middle" />

    If I understood well, you want to retrieve the value of an hiddenfield control that is on the same page as the game ?

  • You seem to be missing a "/" in your highlighted action.

    Set linesOfText to XML.NodeCount("//" & NPCs.dialogueTag & "[b][u]/[/u][/b]normal/blocks/element[" & NPCs.dialogueBlockCurIndex & "]/text")