#1 10-09-2010 13:34

Amaimon
From: Yakutsk
Registered: 20-03-2009
Posts: 11

[SA|REL|CLEO4] FBI Headquarter

Скрипт штаба ФБР. Все действия происходят в здании Департамента планирования (на миссии это никак не скажется)

Было решено поставить большинству CivMale вместо Cop, т.к. сидящий на ресепшне офицер, держащий СМГ и размахивающие им во время беседы другие агенты смотрятся весьма комично)

Create the FBI HQ in Plane Department (Las Venturas)

{$CLEO}

:FBIHQSTART
wait 100
0000: NOP
thread "FBIHQ"

:FBIHQMainCheck
wait 200
if
Player.Defined($PLAYER_CHAR)
jf @FBIHQMainCheck

:FBIHQSecondaryCheck
wait 300
09E8: 0@ = actor $PLAYER_ACTOR active_interior
if and
$ONMISSION == 0
0038: 0@ == 3 // integer values
jf @FBIHQMainCheck

:FBIHQLoading
wait 300
Model.Load(#FBI)
Model.Load(-63)
Model.Load(330)
04ED: load_animation "SMOKING" 
04ED: load_animation "cop_ambient"
04ED: load_animation "gangs"
04ED: load_animation "police"
038B: load_requested_models 

:FBIHQLoadReq
wait 300
if and
Model.Available(#FBI)
Model.Available(-63)
Model.Available(330)
04EE:   animation "cop_ambient" loaded 
04EE:   animation "SMOKING" loaded 
04EE:   animation "police" loaded 
04EE:   animation "PED" loaded 
jf @FBIHQLoadReq

:FBIHQAccessCode
wait 100
07FB: set_interior "PAPER" accessible 1 
04BB: select_interior 3 // select render area

:FBIHQMainCode
wait 200
1@ = Actor.Create(CivMale, #FBI, 359.7724, 173.5793, 1007.389)
0860: link_actor 1@ to_interior 3
08AD: put_actor 1@ at 2415.348 1123.942 radius 10.0 // interior version 
Actor.Angle(1@) = 261.0
06B0: AS_actor 1@ sit_down 50000000 ms
2@ = Actor.Create(CivMale, #FBI, 336.205, 173.5649, 1018.984)
0860: link_actor 2@ to_interior 3
Actor.Angle(2@) = 21.0
08AD: put_actor 2@ at 2415.348 1123.942 radius 10.0 // interior version 
3@ = Actor.Create(CivMale, #FBI, 335.1483, 175.8309, 1018.984)
0860: link_actor 3@ to_interior 3
Actor.Angle(3@) = 21.0
08AD: put_actor 3@ at 2415.348 1123.942 radius 10.0 // interior version 
0677: AS_actor 2@ chat_with_actor 3@ lead_speaker_flag 1 unknown_flag 1 
0677: AS_actor 3@ chat_with_actor 2@ lead_speaker_flag 0 unknown_flag 1
4@ = Actor.Create(CivMale, #FBI, 347.6199, 171.2935, 1018.991)
0860: link_actor 4@ to_interior 3
Actor.Angle(4@) = 89.0
08AD: put_actor 4@ at 2415.348 1123.942 radius 10.0 // interior version
5@ = Actor.Create(CivMale, #FBI, 347.7367, 172.3383, 1018.991)
0860: link_actor 5@ to_interior 3
Actor.Angle(5@) = 270.0
08AD: put_actor 5@ at 2415.348 1123.942 radius 10.0 // interior version 
0677: AS_actor 4@ chat_with_actor 5@ lead_speaker_flag 1 unknown_flag 1 
0677: AS_actor 5@ chat_with_actor 4@ lead_speaker_flag 0 unknown_flag 1 
6@ = Actor.Create(CivMale, #FBI, 366.2195, 178.2328, 1007.398)
0860: link_actor 6@ to_interior 3
Actor.Angle(6@) = 256.0
08AD: put_actor 6@ at 2415.348 1123.942 radius 10.0 // interior version 
7@ = Actor.Create(CivMale, #FBI, 367.4051, 178.2571, 1007.397)
0860: link_actor 7@ to_interior 3
Actor.Angle(7@) = 75.0
08AD: put_actor 7@ at 2415.348 1123.942 radius 10.0 // interior version 
0677: AS_actor 6@ chat_with_actor 7@ lead_speaker_flag 1 unknown_flag 1 
0677: AS_actor 7@ chat_with_actor 6@ lead_speaker_flag 0 unknown_flag 1 
8@ = Actor.Create(Cop, #FBI, 377.9352, 192.4556, 1013.18)
0860: link_actor 8@ to_interior 3
Actor.Angle(8@) = 124.31
08AD: put_actor 8@ at 2415.348 1123.942 radius 10.0 // interior version 
9@ = Actor.Create(Cop, #FBI, 377.2169, 190.7318, 1013.18)
0860: link_actor 9@ to_interior 3
Actor.Angle(9@) = 5.7879
08AD: put_actor 9@ at 2415.348 1123.942 radius 10.0 // interior version
10@ = Actor.Create(CivMale, #FBI, 346.2697, 166.5069, 1014.1875)
0860: link actor 10@ to interior 3
Actor.Angle(10@) = 178.922
11@ = Object.Create(-63, 346.2697, 166.5069, 1014.1875)
0566: object 11@ set_interior 3
070A: AS_actor 10@ attach_to_object 11@ offset 0.04 0.1 -0.02 on_bone 5 16 perform_animation "NULL" IFP_file "NULL" time -1 
0812: AS_actor 10@ perform_animation "M_SMKLEAN_LOOP" IFP_file "SMOKING" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 
12@ = Actor.Create(CivMale, #FBI, 356.3026, 162.4544, 1019.9844)
0860: link_actor 12@ to_interior 3
Actor.Angle(12@) = 123.162
06B0: AS_actor 12@ sit_down 50000000 ms
13@ = Actor.Create(CivMale, #FBI, 360.9061, 191.4278, 1019.9912)
0860: link_actor 13@ to_interior 3
Actor.Angle(13@) = 87.923
0812: AS_actor 13@ perform_animation "Copbrowse_loop" IFP_file "cop_ambient" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1
14@ = Actor.Create(CivMale, #FBI, 359.3545, 177.8159, 1019.9844)
0860: link_actor 14@ to_interior 3
Actor.Angle(14@) = 175.587
06B0: AS_actor 14@ sit_down 50000000 ms
15@ = Actor.Create(CivMale, #FBI, 361.8306, 151.9826, 1025.7891)
0860: link_actor 15@ to_interior 3
Actor.Angle(15@) = 74.786
0812: AS_actor 15@ perform_animation "Copbrowse_loop" IFP_file "cop_ambient" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1
16@ = Actor.Create(Cop, #FBI, 370.0582, 164.908, 1019.9844)
0860: link_actor 16@ to_interior 3
Actor.Angle(16@) = 234.251
17@ = Actor.Create(Cop, #FBI, 379.329, 164.9877, 1025.7891)
0860: link_actor 17@ to_interior 3
Actor.Angle(17@) = 152.830
18@ = Actor.Create(Cop, #FBI, 390.0627, 170.0561, 1008.3828)
0860: link_actor 18@ to_interior 3
Actor.Angle(18@) = 70.255
19@ = Actor.Create(Cop, #FBI, 390.1692, 177.65, 1008.3828)
0860: link_actor 19@ to_interior 3
Actor.Angle(19@) = 121.810
20@ = Actor.Create(CivMale, #FBI, 354.5317, 182.3583, 1008.3806)
0860: link_actor 20@ to_interior 3
Actor.Angle(20@) = 82.330
0812: AS_actor 20@ perform_animation "Copbrowse_loop" IFP_file "cop_ambient" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1
21@ = Actor.Create(CivMale, #FBI, 357.7479, 208.9945, 1008.3828)
0860: link_actor 21@ to_interior 3
Actor.Angle(21@) = 203.133
06B0: AS_actor 21@ sit_down 50000000 ms
22@ = Actor.Create(CivMale, #FBI, 347.2697, 157.965, 1014.1875)
0860: link_actor 22@ to_interior 3
Actor.Angle(22@) = 3.537
23@ = Object.Create(-63, 347.2697, 157.965, 1014.1875)
0566: object 23@ set_interior 3
070A: AS_actor 22@ attach_to_object 23@ offset 0.04 0.1 -0.02 on_bone 5 16 perform_animation "NULL" IFP_file "NULL" time -1 
0812: AS_actor 22@ perform_animation "M_SMKLEAN_LOOP" IFP_file "SMOKING" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 
24@ = Actor.Create(CivMale, #FBI, 348.833, 158.4165, 1014.1875)
0860: link_actor 24@ to_interior 3
Actor.Angle(24@) = 63.413
0729: AS_actor 24@ hold_cellphone 1 
25@ = Actor.Create(CivMale, #FBI, 354.8474, 161.3177, 1008.3798)
0860: link_actor 25@ to_interior 3
Actor.Angle(25@) = 82.503
0729: AS_actor 25@ hold_cellphone 1 
26@ = Actor.Create(CivMale, #FBI, 374.1309, 183.301, 1008.3828)
0860: link_actor 26@ to_interior 3
Actor.Angle(26@) = 90.963
06B0: AS_actor 26@ sit_down 50000000 ms
27@ = Actor.Create(CivMale, #FBI, 372.2982, 184.5317, 1008.3893)
0860: link_actor 27@ to_interior 3
Actor.Angle(27@) = 271.903
06B0: AS_actor 27@ sit_down 50000000 ms
28@ = Actor.Create(CivMale, #FBI, 373.0045, 183.2265, 1008.3828)
0860: link_actor 28@ to_interior 3
Actor.Angle(28@) = 3.84
06B0: AS_actor 28@ sit_down 50000000 ms
29@ = Actor.Create(CivMale, #FBI, 360.0057, 216.7395, 1008.3828)
0860: link_actor 29@ to_interior 3
Actor.Angle(29@) = 350.92
0812: AS_actor 29@ perform_animation "Copbrowse_loop" IFP_file "cop_ambient" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1
30@ = Actor.Create(CivMale, #FBI, 357.9725, 201.2638, 1008.3828)
0860: link_actor 30@ to_interior 3
Actor.Angle(30@) = 328.304
06B0: AS_actor 30@ sit_down 50000000 ms
0376: 31@ = create_random_actor_at 371.4996 171.8993 1019.9844 
0860: link_actor 31@ to_interior 3
Actor.Angle(31@) = 355.274
06B0: AS_actor 31@ sit_down 50000000 ms
32@ = Actor.Create(CivMale, #FBI, 371.6086, 172.892, 1019.9844)
0860: link_actor 32@ to_interior 3
Actor.Angle(32@) = 182.649
0812: AS_actor 32@ perform_animation "ATM" IFP_file "PED" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1
33@ = Actor.Create(CivMale, #FBI, 361.766, 174.3979, 1008.3893)
0860: link_actor 33@ to_interior 3
Actor.Angle(33@) = 105.353
0812: AS_actor 33@ perform_animation "PLC_DRGBST_02" IFP_file "POLICE" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1

:FBIHQSecondaryCheck2
wait 300
09E8: 0@ = actor $PLAYER_ACTOR active_interior
if
  0@ == 0 // integer values
jf @FBIHQSecondaryCheck2

:FBIHQDeleteData
wait 700
Model.Destroy(#FBI)
Object.Destroy(-63)
Model.Destroy(330)
Actor.RemoveReferences(1@)
Actor.RemoveReferences(2@)
Actor.RemoveReferences(3@)
Actor.RemoveReferences(4@)
Actor.RemoveReferences(5@)
Actor.RemoveReferences(6@)
Actor.RemoveReferences(7@)
Actor.RemoveReferences(8@)
Actor.RemoveReferences(9@)
Actor.RemoveReferences(10@)
Actor.RemoveReferences(12@)
Actor.RemoveReferences(13@)
Actor.RemoveReferences(14@)
Actor.RemoveReferences(15@)
Actor.RemoveReferences(16@)
Actor.RemoveReferences(17@)
Actor.RemoveReferences(18@)
Actor.RemoveReferences(19@)
Actor.RemoveReferences(20@)
Actor.RemoveReferences(21@)
Actor.RemoveReferences(22@)
Actor.RemoveReferences(24@)
Actor.RemoveReferences(25@)
Actor.RemoveReferences(26@)
Actor.RemoveReferences(27@)
Actor.RemoveReferences(28@)
Actor.RemoveReferences(29@)
Actor.RemoveReferences(30@)
Actor.RemoveReferences(31@)
Actor.RemoveReferences(32@)
Actor.RemoveReferences(33@)
Object.RemoveReferences(11@)
Object.RemoveReferences(23@)
04EF: release_animation "SMOKING" 
04EF: release_animation "cop_ambient"
04EF: release_animation "police"
jump @FBIHQMainCheck

[img align=C]http://img820.imageshack.us/img820/4792/81956886.jpg[/img]



Код обновлен.
Code updated.

Изменения:
- Оптимизирован код скрипта. В итоге все стало предельно лаконично и ясно;
- Добавлено больше реализма в действия офицеров (разговоры, курение, разговоры по телефону, допрос подозреваемых итп.);
- Расставлены несколько офицеров с типом "Cop" вместо "CivMale".

Last edited by Amaimon (11-09-2010 13:33)


Эпитафия на могиле фидошника: "Меня видно?"

Offline

#2 10-09-2010 13:41

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

Re: [SA|REL|CLEO4] FBI Headquarter

:FBIHEAD4
wait 100
if
0038: 0@ == 0 // integer values
jf @FBIHEAD4

смущает это место. здесь мы уходим в цикл ожидания, пока переменная 0@ не будет равна 0. Но ведь ее значение тут не меняется. Получается, мы никогда с этого цикла не выйдем?

Offline

#3 10-09-2010 14:55

Sanchez
Registered: 18-08-2006
Posts: 280

Re: [SA|REL|CLEO4] FBI Headquarter

Amaimon wrote:

Было бы отлично если бы кто нибудь подсказал анимацию, как к примеру в департаменте полиции LV, где офицер сидит на одном колене и что-то ищет в выдвижной полке.

cop_ambient.ifp
	Copbrowse_in
	Copbrowse_loop
	Copbrowse_nod
	Copbrowse_out
	Copbrowse_shake

Offline

#4 10-09-2010 17:46

Sw[ee]t
From: Нижний Новгород
Registered: 16-02-2009
Posts: 686
Website

Re: [SA|REL|CLEO4] FBI Headquarter

@Seemann - это он хотел сделать проверку на не нахождение игрока в помещении. Просто забыл ещё раз узнать текущий интерьер.

:FBIHEAD4
09E8: 0@ = actor $PLAYER_ACTOR active_interior
if
  0@ == 0 // integer values
jf @FBIHEAD4

Offline

#5 10-09-2010 22:10

Amaimon
From: Yakutsk
Registered: 20-03-2009
Posts: 11

Re: [SA|REL|CLEO4] FBI Headquarter

@Sanchez - отлично, спасибо;)

@Sw[ee]t @Seemann- доработаю, спасибо за указание smile

Last edited by Amaimon (11-09-2010 06:26)


Эпитафия на могиле фидошника: "Меня видно?"

Offline

Board footer

Powered by FluxBB