Real Free fall addon

Данная версия добавляет пока что реалистичную анимацию свободного падения с учётом физических законов.

В данной версии при падении учитывается коллизия окружающего мира, игрок при ударе об стенку и землю отлетает!

{$VERSION 3.1.1000}
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP
thread 'FALL'
03F0: enable_text_draw 1
gosub @FALL_3813

:FALL_24
wait 1
if
Player.Defined($PLAYER_CHAR)
else_jump @FALL_24
if or
Actor.Driving($PLAYER_ACTOR)
04A9: actor $PLAYER_ACTOR driving_heli
04C8: actor $PLAYER_ACTOR driving_flying_vehicle
else_jump @FALL_24
5@ = Actor.CurrentCar($PLAYER_ACTOR)

:FALL_78
wait 1
if
Player.Defined($PLAYER_CHAR)
else_jump @FALL_3771
if
not Car.Wrecked(5@)
else_jump @FALL_3771
if
Actor.Driving($PLAYER_ACTOR)
02E3: $VEKTOR_SPEED = car 5@ speed
06A2: get_car 5@ velocity_in_direction_XYZ $8 $9 $10
18@ = 0
else_jump @FALL_166
jump @FALL_78

:FALL_166
wait 0
0819: 16@ = actor $PLAYER_ACTOR distance_from_ground
0407: store_coords_to 10@ 11@ 12@ from_car 5@ with_offset -3.0 -3.0 0.0
0407: store_coords_to 13@ 14@ 15@ from_car 5@ with_offset 3.0 3.0 0.0
if
Player.Defined($PLAYER_CHAR)
else_jump @FALL_3771
if and
$VEKTOR_SPEED > 10.0
0202: actor $PLAYER_ACTOR near_car 5@ radius 105.0 105.0 sphere 0
16@ > 2.0
84AD: not actor $PLAYER_ACTOR in_water
else_jump @FALL_3771
Car.SetSpeedInstantly(5@, $VEKTOR_SPEED)
if
86BD: not no_obstacles_between 10@ 11@ 12@ and 13@ 14@ 15@ solid 1 car 0 actor 0 object 0 particle 0
else_jump @FALL_375
08CB: explode_car 5@ shake 1 effect 1 sound 1
jump @FALL_375

:FALL_375
wait 0
if
Player.Defined($PLAYER_CHAR)
else_jump @FALL_24
wait 0
if and
not Actor.Driving($PLAYER_ACTOR)
8965: not actor $PLAYER_ACTOR swimming
8A0C: not player $PLAYER_CHAR on_jetpack
09E7: player $PLAYER_CHAR not_frozen
else_jump @FALL_24
wait 0
if and
not fading
86B9: not cutscene_data_loaded
else_jump @FALL_24
if
not Actor.Animation($PLAYER_ACTOR) == "EXPLO_FALLSK1"
else_jump @FALL_24
if
not Actor.Animation($PLAYER_ACTOR) == "EXPLO_FALLSK2"
else_jump @FALL_24
if
not Actor.Animation($PLAYER_ACTOR) == "EXPLO_FALLSK3"
else_jump @FALL_24

:FALL_542
wait 0
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
04C4: store_coords_to 5@ 6@ 7@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -20.0
if and
09E7: player $PLAYER_CHAR not_frozen
not Actor.Animation($PLAYER_ACTOR) == "EXPLO_FALLSK2"
not Actor.HasWeapon($PLAYER_ACTOR, 46)
06BD: no_obstacles_between 1@ 2@ 3@ and 5@ 6@ 7@ solid 1 car 0 actor 0 object 1 particle 0
else_jump @FALL_542
if
not Actor.Animation($PLAYER_ACTOR) == "EXPLO_FALLSK1"
else_jump @FALL_24
if
not Actor.Animation($PLAYER_ACTOR) == "EXPLO_FALLSK3"
else_jump @FALL_24
if
8A0C: not player $PLAYER_CHAR on_jetpack
else_jump @FALL_24
gosub @FALL_3813
04ED: load_animation "PARACHUTE"
04ED: load_animation "FINALE"
04ED: load_animation "MD_CHASE"
$SPEED_ADDON = -20.0
083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ 23@ 24@ 25@
Player.SetDrunkVisuals($PLAYER_CHAR, 20)
$VEKTOR_SPEED += 15
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 $VEKTOR_SPEED 0.0
04C4: store_coords_to 3@ 4@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 -5.0 0.0
0063: 0@ -= 3@ // (float)
0063: 1@ -= 4@ // (float)
2@ = 0
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0@ 1@ -17.0
Actor.StorePos($PLAYER_ACTOR, 21@, 22@, 23@)
0922: set_camera_zoom_from 80.0 to 15.0 timelimit 200 smooth_transition 2
wait 200
$LIM_GR = 15.5
32@ = 0
$STATUS_UDARA = 0

:FALL_990
0209: 0@ = random_int_in_ranges 0 4
wait 0
if
0@ == 0
else_jump @FALL_1068
0812: AS_actor $PLAYER_ACTOR perform_animation "RND_FALL_1" IFP "SKRIPT" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB
jump @FALL_1275

:FALL_1068
wait 0
if
0@ == 1
else_jump @FALL_1137
0812: AS_actor $PLAYER_ACTOR perform_animation "RND_FALL_2" IFP "SKRIPT" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB
jump @FALL_1275

:FALL_1137
wait 0
if
0@ == 2
else_jump @FALL_1206
0812: AS_actor $PLAYER_ACTOR perform_animation "RND_FALL_3" IFP "SKRIPT" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB
jump @FALL_1275

:FALL_1206
wait 0
if
0@ == 3
else_jump @FALL_990
0812: AS_actor $PLAYER_ACTOR perform_animation "RND_FALL_4" IFP "SKRIPT" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB
jump @FALL_1275

:FALL_1275
wait 0
0090: 25@ = float $VEKTOR_SPEED to_integer
if
not $VEKTOR_SPEED >= 0
else_jump @FALL_1312
$VEKTOR_SPEED += 3

:FALL_1312
083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ $ADDON_UPDATEX $RUN_SPEED $FALL_SPEED
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 $RUN_SPEED 0.0
04C4: store_coords_to 3@ 4@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
0063: 0@ -= 3@ // (float)
0063: 1@ -= 4@ // (float)
2@ = 0
0090: $FALL_SPEED_PR = float $FALL_SPEED to_integer
0090: 25@ = float 1@ to_integer
if
not 25@ >= 10
else_jump @FALL_1727
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
04C4: store_coords_to 3@ 4@ 5@ from_actor $PLAYER_ACTOR with_offset 0.0 2.7 0.0
04C4: store_coords_to 10@ 11@ 12@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
04C4: store_coords_to 10@ 11@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -12.0
if and
not $STATUS_UDARA >= 3
06BD: no_obstacles_between 10@ 11@ 12@ and 10@ 11@ 13@ solid 1 car 1 actor 0 object 1 particle 0
86BD: not no_obstacles_between 0@ 1@ 2@ and 3@ 4@ 5@ solid 1 car 0 actor 0 object 1 particle 0
else_jump @FALL_1727
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0@ 1@ $SPEED_ADDON
Actor.Angle($PLAYER_ACTOR) = $ROTTION_PR
$ROTTION_PR += 180.0
083E: set_actor $PLAYER_ACTOR rotation 0.0 0.0 $ROTTION_PR while_in_air
$SPEED_ADDON += 5.14
32@ = 0
$VEKTOR_SPEED += -30.0
$LIM_GR = -15.5
$STATUS_UDARA += 1

:FALL_1727
0090: $SPL_SPEED = float $VEKTOR_SPEED to_integer
0922: set_camera_zoom_from 80.0 to 15.0 timelimit 300 smooth_transition 1
04C4: store_coords_to 10@ 11@ 12@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
04C4: store_coords_to 10@ 11@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -3.0
if and
not $FALL_SPEED_PR > -2
06BD: no_obstacles_between 10@ 11@ 12@ and 10@ 11@ 13@ solid 1 car 1 actor 0 object 1 particle 0
not Actor.HasWeapon($PLAYER_ACTOR, 46)
8A0C: not player $PLAYER_CHAR on_jetpack
84AD: not actor $PLAYER_ACTOR in_water
else_jump @FALL_2030
Actor.StorePos($PLAYER_ACTOR, $TEMPVAR_FLOAT_1, $TEMPVAR_FLOAT_2, $TEMPVAR_FLOAT_3)
050A: 24@ = distance_between_XYZ $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 and_XYZ 21@ 22@ 23@
0090: 25@ = float $VEKTOR_SPEED to_integer
$SPEED_ADDON += -0.14
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 $VEKTOR_SPEED 0.0
04C4: store_coords_to 3@ 4@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
0063: 0@ -= 3@ // (float)
0063: 1@ -= 4@ // (float)
2@ = 0
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0@ 1@ $SPEED_ADDON
jump @FALL_1275

:FALL_2030
wait 0
if
not Actor.HasWeapon($PLAYER_ACTOR, 46)
else_jump @FALL_24

:FALL_2052
wait 0
04C4: store_coords_to 10@ 11@ 12@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
04C4: store_coords_to 10@ 11@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -2.0
if
84AD: not actor $PLAYER_ACTOR in_water
else_jump @FALL_3610
if
8818: not actor $PLAYER_ACTOR in_air
else_jump @FALL_2374
if
06BD: no_obstacles_between 10@ 11@ 12@ and 10@ 11@ 13@ solid 1 car 1 actor 0 object 1 particle 0
else_jump @FALL_2374
wait 0
if
Actor.Dead($PLAYER_ACTOR)
else_jump @FALL_2052
if
not $STATUS_UDARA == 1
else_jump @FALL_2261
Actor.Angle($PLAYER_ACTOR) = $ROTTION_PR
$ROTTION_PR += -180.0
083E: set_actor $PLAYER_ACTOR rotation 0.0 0.0 $ROTTION_PR while_in_air

:FALL_2261
Player.SetDrunkVisuals($PLAYER_CHAR, 0)
Actor.StorePos($PLAYER_ACTOR, $TEMPVAR_FLOAT_1, $TEMPVAR_FLOAT_2, $TEMPVAR_FLOAT_3)
09B8: create_blood_gush_at $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 with_offset 0.0 0.0 2.0 density 20 on_actor $PLAYER_ACTOR
0829: actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE_DIE" IFP_file "PARACHUTE" 1000.0 time 0 and_dies
04EF: release_animation "PARACHUTE"
jump @FALL_24

:FALL_2374
wait 0
if
$STATUS_UDARA == 1
else_jump @FALL_2432
Actor.Angle($PLAYER_ACTOR) = $ROTTION_PR
$ROTTION_PR += -180.0
083E: set_actor $PLAYER_ACTOR rotation 0.0 0.0 $ROTTION_PR while_in_air

:FALL_2432
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 25.0
wait 10
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.5 0.0 0.0
04C4: store_coords_to 4@ 5@ 6@ from_actor $PLAYER_ACTOR with_offset -0.5 2.5 0.0
if
06BD: no_obstacles_between 1@ 2@ 3@ and 4@ 5@ 6@ solid 1 car 1 actor 0 object 1 particle 0
else_jump @FALL_2730
$LIM_GR = 30.0
$LIM_GR_ADD = 0.0
$V1 = 1
0209: 0@ = random_int_in_ranges 0 2
if
not 0@ == 0
else_jump @FALL_2673
0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE_DIE" IFP "PARACHUTE" framedelta 8.0 loopA 0 lockX 1 lockY 0 lockF 0 time -2 // versionB
$TIME_SP_LIM = 400
jump @FALL_2821

:FALL_2673
0812: AS_actor $PLAYER_ACTOR perform_animation "FIN_LAND_DIE" IFP "FINALE" framedelta 8.0 loopA 0 lockX 1 lockY 0 lockF 0 time -2 // versionB
$TIME_SP_LIM = 600
jump @FALL_2821

:FALL_2730
$LIM_GR_ADD = 30.0
$LIM_GR = 0.0
$TIME_SP_LIM = 400
$V1 = 0
0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE_DIE" IFP "PARACHUTE" framedelta 8.0 loopA 0 lockX 1 lockY 0 lockF 0 time -2 // versionB
jump @FALL_2821

:FALL_2821
if
$SPL_SPEED >= 15
else_jump @FALL_3201
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 $LIM_GR_ADD 0.0
04C4: store_coords_to 4@ 5@ 6@ from_actor $PLAYER_ACTOR with_offset 0.0 $LIM_GR 0.0
0063: 4@ -= 1@ // (float)
0063: 5@ -= 2@ // (float)
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 4@ 5@ 10.0
32@ = 0

:FALL_2932
if
0025: $TIME_SP_LIM > 32@ // (float)
else_jump @FALL_2979
0922: set_camera_zoom_from 80.0 to 15.0 timelimit 300 smooth_transition 1
wait 0
jump @FALL_2932

:FALL_2979
if
$V1 == 0
else_jump @FALL_3345
32@ = 0
0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_FRONT" IFP "PED" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB

:FALL_3041
wait 0
0922: set_camera_zoom_from 80.0 to 15.0 timelimit 300 smooth_transition 1
04C4: store_coords_to 10@ 11@ 12@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
04C4: store_coords_to 10@ 11@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -2.0
if
84AD: not actor $PLAYER_ACTOR in_water
else_jump @FALL_3610
if and
06BD: no_obstacles_between 10@ 11@ 12@ and 10@ 11@ 13@ solid 1 car 0 actor 0 object 1 particle 0
not Actor.HasWeapon($PLAYER_ACTOR, 46)
8A0C: not player $PLAYER_CHAR on_jetpack
84AD: not actor $PLAYER_ACTOR in_water
else_jump @FALL_3201
jump @FALL_3041

:FALL_3201
Player.SetDrunkVisuals($PLAYER_CHAR, 0)
Actor.StorePos($PLAYER_ACTOR, $TEMPVAR_FLOAT_1, $TEMPVAR_FLOAT_2, $TEMPVAR_FLOAT_3)
09B8: create_blood_gush_at $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 with_offset 0.0 0.0 2.0 density 20 on_actor $PLAYER_ACTOR
050A: 24@ = distance_between_XYZ $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 and_XYZ 21@ 22@ 23@
0090: 25@ = float 24@ to_integer
0829: actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE_DIE" IFP_file "PARACHUTE" 1000.0 time 0 and_dies
04EF: release_animation "PARACHUTE"
jump @FALL_24

:FALL_3345
32@ = 0
0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_FRONT" IFP "PED" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB

:FALL_3389
wait 0
0922: set_camera_zoom_from 80.0 to 15.0 timelimit 300 smooth_transition 1
04C4: store_coords_to 10@ 11@ 12@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
04C4: store_coords_to 10@ 11@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -2.0
if
84AD: not actor $PLAYER_ACTOR in_water
else_jump @FALL_3610
if and
06BD: no_obstacles_between 10@ 11@ 12@ and 10@ 11@ 13@ solid 1 car 0 actor 0 object 1 particle 0
not Actor.HasWeapon($PLAYER_ACTOR, 46)
8A0C: not player $PLAYER_CHAR on_jetpack
84AD: not actor $PLAYER_ACTOR in_water
else_jump @FALL_3549
jump @FALL_3389

:FALL_3549
0829: actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE_DIE" IFP_file "PARACHUTE" 1000.0 time 0 and_dies
04EF: release_animation "PARACHUTE"
jump @FALL_24

:FALL_3610
wait 0
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
04C4: store_coords_to 4@ 5@ 6@ from_actor $PLAYER_ACTOR with_offset 0.0 15.5 0.0
0063: 4@ -= 1@ // (float)
0063: 5@ -= 2@ // (float)
Player.SetDrunkVisuals($PLAYER_CHAR, 0)
0615: define_AS_pack_begin 31@
0812: AS_actor $PLAYER_ACTOR perform_animation "GETUP_FRONT" IFP "PED" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time 1 // versionB
0616: define_AS_pack_end 31@
0618: assign_actor $PLAYER_ACTOR to_AS_pack 31@
04EF: release_animation "PARACHUTE"
jump @FALL_24

:FALL_3771
061B: remove_references_to_AS_pack 0@
Car.SetImmunities(5@, 0, 0, 0, 0, 0)
Car.RemoveReferences(5@)
Camera.Shake(0)
wait 0
jump @FALL_24
0A93: end_custom_thread

:FALL_3813
wait 0
if
84EE: not animation "SKRIPT" loaded
else_jump @FALL_3859
04ED: load_animation "SKRIPT"
wait 0
jump @FALL_3813

:FALL_3859
return



Просмотров: 1527
5.11.2015, 12:06 -

Категория: Grand Theft Auto: San Andreas » Скрипты для Grand Theft Auto: San Andreas » CLEO скрипты для Grand Theft Auto: San Andreas

Коментарии к Real Free fall addon: