# SimFlight

Objects
Movement
5.1 OC
array
int x X offset of the starting position. (NOT optional if used in `nil` object context)
int y Y offset of the starting position. (NOT optional if used in `nil` object context)
int xdir Initial horizontal speed. If not specified this will default to the object's horizontal speed. (NOT optional if used in `nil` object context)
int ydir Initial vertical speed. If not specified this will default to the object's vertical speed. (NOT optional if used in `nil` object context)
int min_density Minimum density of the material which will stop the projected trajectory. If not specified this will default to value 50 (solid material).
int max_density Maximum density of the material which will stop the projected trajectory. If not specified this will default to value 100.
int iterations Number of simulated frames for which the projection runs. If not specified or nonpositive the simulation will run indefinitely until material or the limits of the landscape are encountered.
int precision Precision. Default 10 if not specified.
Simulates the motion of a falling object with a given starting position and initial speed. The returned array will contain [int x_final, int y_final, int xdir_final, int ydir_final, int time_passed].
If the projected trajectory encounters a material of the specified density, the simulation will stop and time_passed will be non-negative. Otherwise, time_passed will be negative.
if (GetAction() == "Jump") { var end = SimFlight() if (end[3] >= 80) Message("Oh oh, this will be a rough impact!"); }
If the calling clonk is situated in mid-air and it appears that he will hit the ground at high speed, he will call out.
Newton
2004-03
Peewee
2010-10