What animpos means? I've searched on both manuals but there is no mention to it.
It is entity property which means frame of animation. Just reminder, 1st frame is counted as 0, 2nd frame as 1 and so on.
How these 2 crecreates 35% of probability?
First of all, rand()%30 gets random value from -30 to 30. Since r (variable to hold value) is integer, the result of rand function is integer i.e -30, -29, ... , 29, 30
If you count how many possible values you may get, there are 61 values.
To define randomness to 35% as you requested, we need to define range of values for r from 61 possible values.
So how many accepted values from those 61 values?
To simplify, let's round 61 to 60.
x/60 = 35/100
x = 60*0.35 = 21
That means we need to 'take' just 21 of those 61 possible values. There are multiple ways to do that but the simplest way is to take range of accepted values.
For instance, let's take positive values from 30 (highest possible value) to below. To take 21 values, that means the lowest limit is 30-21=9
So the accepted range is r>9.
I made typo in script above but it's slight error and hard to see in game.
what decides the frame of rise anim when the dizzy anim can be played?
The script I posted above doesn't modify frame.