Yeah, the for loop is definitely lacking the increment parameter.
You missed the part where he said "subevents". <img src="smileys/smiley2.gif" border="0" align="middle" />
Develop games in your browser. Powerful, performant & highly capable.
Output the result in a textbox. If an error occurs on the server, Ajax.LastData() might contain the error report.
There is a nifty little built-in function that returns the angle between two points. Check it out on this page ! It's under "Math". <img src="smileys/smiley2.gif" border="0" align="middle">
Can you paste the events directly ? I can't access your file from here !
When dealing with behaviors, never use dt. Behaviors generally already use it internally (at least, all official ones do).
Functions could help you.
See this example.
No, that is not the case. Once the "Single = 1" condition has been evaluated and proven true, all sub-events will be executed, without ever "coming back" to see if "Single" still equals 1 (that is, until the next tick).
Your problem comes from the fact that some cases cause two or more conditions to successively become true. A problem easily avoided by adding an else statement to each condition (excepted the first).
Using ArcadEd logic, you could fit all of it in a single expression.
On collision with player: Set DAMAGE to (random(100) <= 80) ? 20 : int(random(10,20))
Are you calling the function directly using "14" as a parameter ? Try logging every instance UID to see if there's actually one with the UID "14". If in fact there is, then this one will be confirmed as a bug !
Use "compare two values" from the system condition. Since you probably have only one ball, you don't have to worry about picking the right instance, so simply compare ball.physics.yourVariable and 50.
Try using tokenat(AJAX.LastData, 0, "<!--"). It should get rid of the excess data.
Member since 4 Jul, 2011