#1 29-07-2020 16:03

Red_Ender
From: Смоленск
Registered: 28-07-2020
Posts: 40

Взрывоопасно!!!

Здравствуйте. Пытаюсь сделать скрипт, суть которого - спавн персонажа, бегущего на гг и при приближении взрывающегося. Но он взрывается всегда, а когда подхожу, перестаёт и больше не взрывается.




КОД:






{$CLEO}
//------------- Mission ---------------


wait 0

$ZOMBIES = 1


:Spawn
wait 0
if
Player.Defined(0)
jf @Spawn
0923: enable_air_traffic 0
06D7: enable_train_traffic 0
06D0: enable_emergency_traffic 0
01EB: set_traffic_density_multiplier_to 0.0
03DE: set_pedestrians_density_multiplier_to 0.0
08DD: lose_stuff_after_wasted 0
072C: generate_police_bikes 0
099E: enable_police_patrols 0
01F0: set_max_wanted_level_to 0
wait 100


:SPAWN_ZOMBIES
wait 200

0208: 25@ = random_float_in_ranges -120.0 120.0
0208: 26@ = random_float_in_ranges -120.0 120.0
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 25@ 26@ 0.0
0376: 18@ = = create_random_actor_at 1@ 2@ -100.0
02AB: set_actor 18@ immunities BP 0 FP 1 EP 1 CP 0 MP 0
marker.CreateAboveActor(14@,18@)

05E2: AS_actor 18@ kill_actor $PLAYER_ACTOR

077A: set_actor 18@ acquaintance 4 to_actors_pedtype 0


Actor.Health(18@) = 1900

jump @check_3







:check_2
wait 0
if
8104:   not actor $PLAYER_ACTOR near_actor 18@ radius 70.0 70.0 70.0 sphere 0
then
    actor.Health(18@) = 0
end
jump @check

:check
wait 0
if or
actor.Dead(18@)
if or
    not actor.Dead(18@)
8104:   actor $PLAYER_ACTOR near_actor 18@ radius 100.0 100.0 100.0 sphere 0
then
    wait 0
else
    if
        not actor.Dead(18@)
    then
    Actor.DestroyInstantly(18@)
    end
    actor.RemoveReferences(18@)
0208: 25@ = random_float_in_ranges -120.0 120.0
0208: 26@ = random_float_in_ranges -120.0 120.0
04C4: store_coords_to 1@ 2@ 23@ from_actor $PLAYER_ACTOR with_offset 25@ 26@ 0.0
    0376: 18@ = = create_random_actor_at 1@ 2@ -100.0
    05E2: AS_actor 18@ kill_actor $PLAYER_ACTOR
    Actor.SetWalkStyle(18@, "WOMAN")
    Actor.Health(18@) = 1500
    077A: set_actor 18@ acquaintance 4 to_actors_pedtype 0
end
jump @check_2
:check_3
wait 0
if
8104:   actor $PLAYER_ACTOR near_actor 18@ radius 10.0 10.0 10.0 sphere 0
then
actor.StorePos(18@,17@, 16@, 15@)
020c: create_explosion_with_radius 8 at 17@ 16@ 15@
0948: create_explosion_at 17@ 16@ 15@ type 8 camera_shake 1
wait 10
else
jump @check_2
end

jump @check_3

Offline

Board footer

Powered by FluxBB