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.
Random(0,1) returns a random floating point value between 0 and 1. You might want to try choose(0, 1).
Develop games in your browser. Powerful, performant & highly capable.
How many parameters do you call your function with ? The Param collection is 0-indexed and you are using "Param(1)", is it intended ?
You can use this. However, keep in mind that any user can modify their system clock at will and thus, "cheat". Using an external source to fetch time is recommanded for such games, but this require an active internet connection.
Yeah, that's two basic features that should be readily available to the text box... Maybe Ashley will find time to add them in the near future. <img src="smileys/smiley9.gif" border="0" align="middle" />
Anyway, as you see, we can easily do without ! <img src="smileys/smiley1.gif" border="0" align="middle" />
You could try to use a text box object set to "textarea" and readonly. With a bit of javascript you can make the text box to autoscroll to bottom. See an example here.
You'll have to use a local variable for that, or do the inversion yourself everytime you use the loopindex. If your "step" is -1, I'd use the second method.
For x = 0 to upperBound
---Set variable to upperBound - loopindex
Yup, you got it right ! I just re-uploaded the example with the implementation of such a ratio.
Leftmost and rightmost positions are respectively at cycle position 0.25 and 0.75. You could use this information to modify the magnitude at will, however, cycle position can't really be tested with such fixed values. You need to test greater than/lesser than and use a boolean to switch the active condition. Second, magnitude shouldn't be changed at those moments, because it'll totally break the behavior... (I just tried <img src="smileys/smiley18.gif" border="0" align="middle">) BUT ! Changing the magnitude at cycle time 0 and 0.5 (when the sprite is centered) should do what you want.
Here's the result : http://www.freewebs.com/johnwof/newRandomMagnitude.capx
A simple reversal of the cos and sin will do the trick.
VectorX = ImpulseStrength * -cos(Angle)
VectorY = ImpulseStrength * -sin(Angle)
Where ImpulseStrength is an arbitrary value of how powerful the recoil will be.