#1 06-11-2007 10:47

Agenzvell
From: Windows/system32
Registered: 28-08-2007
Posts: 109
Website

DeflateTire

Идея такова.

При падении вашей машины с большой высоты у нее прокалываются колеса.

:DeflateTire
wait 100
if and
Player.Defined($PLAYER_CHAR)
Actor.Driving($PLAYER_ACTOR)
jf @DeflateTire

:checking
if and
84C8: not actor $PLAYER_ACTOR driving_flying_vehicle 
84A7: not actor $PLAYER_ACTOR driving_boat
84A9: not actor $PLAYER_ACTOR driving_helicopter
jf @checking

:DeflateTire2
03C0: 1@ = actor $PLAYER_ACTOR car 
if
8496: not tire 3 on_car 1@ deflated 
jf @DeflateTire2
0819: 16@ = actor $PLAYER_ACTOR distance_from_ground

:DeflateTire3
wait 300
if and
16@ > 5.0
Actor.Driving($PLAYER_ACTOR)
jf @DeflateTire3

:DeflateTire4
wait 1000
04FE: deflate_tire 3 on_car 1@
jump @DeflateTire

EDIT. Включены доп. проверки.
EDIT2. Убран0 все лишнее.

Last edited by Agenzvell (07-11-2007 01:54)

Offline

#2 06-11-2007 12:30

Seemann
Registered: 07-08-2006
Posts: 2,155

Re: DeflateTire

Нет необходимости использовать глобальную переменную $CAR, можно обойтись и локальной.
End_thread в конце лишний.

Offline

#3 06-11-2007 12:36

flashTrash
From: Н.Новгород
Registered: 21-02-2007
Posts: 260
Website

Re: DeflateTire

так пральней

:DeflateTire
wait 100
if and
Player.Defined($PLAYER_CHAR)
Actor.Driving($PLAYER_ACTOR)
jf @DeflateTire
03C0: $Car = actor $PLAYER_ACTOR car 
if
8496: not tire 3 on_car $Car deflated 
jf @DeflateTire
0819: 16@ = actor $PLAYER_ACTOR distance_from_ground


:DeflateTire2
wait 300
if and
16@ > 5.0
Actor.Driving($PLAYER_ACTOR)
jf @DeflateTire2

:DeflateTire3
wait 0 // это произвольное значение, ориентировочно машина достигент земли за секунду.
00D6: if 
16@ = 0.0
004D: jump_if_false @DeflateTire3
04FE: deflate_tire 3 on_car $Car
jump @DeflateTire

Offline

#4 06-11-2007 12:48

Seemann
Registered: 07-08-2006
Posts: 2,155

Re: DeflateTire

2flashTrash:

if and
16@ = 0.0

если использовать операцию записи нового значения в переменную ( = ), вместо проверки на равенство ( == ) нечего удивляться потом, что скрипт не работает.

Offline

#5 01-12-2007 17:45

Midnightz
From: U.S.
Registered: 26-08-2007
Posts: 39
Website

Re: DeflateTire

Sorry, I speak English only.  Seemann translate maybe?  I have a mod that uses deflate tire... I hear pop on execute, can have car lower but texture is same (tire looks inflated not deflated).  Ideas why?

Offline

#6 02-12-2007 08:40

Seemann
Registered: 07-08-2006
Posts: 2,155

Re: DeflateTire

2Midnightz:
Is it a custom vehicle? Any wheels mods?

Offline

#7 02-12-2007 12:30

Midnightz
From: U.S.
Registered: 26-08-2007
Posts: 39
Website

Re: DeflateTire

Not a custom car, no mods... This is part of a CLEO script I wrote and it uses 0AB5 to get the car and 04FE to instantly deflate the tire.  I hear the popping sound but the tire looks the same.  Weird huh?

Offline

Board footer

Powered by FluxBB