
witam, ostatnio próbuję swoich sił w robieniu misji(jak narazie dośc nieudolnie
) do cw moda,
no i mam problem w tym, ażeby grupy oddziałów stosowały sie do tzw. linebattle script
to jest ten skrypt (po otwarciu w notatniku):
Wstawiłem sobie oddział na mapę, dałem mu niedaleko punkt trasy, i w polu inicjacji dowódcy wpisałem to, co było podane (jako totalny żółtodziób w majstrowaniu przy opfie nie miałem pojęcia skąd dowiedziec wartości w polu [nameofgroup], więc próbowałem kolejno wpisywac "this", "1", "alphablack1")
za każdym razem jak robiłem podgląd jednostka biegła do punktu tak jak zawsze(normalnie), a u góry ekranu wyskakiwał taki bląd
Tak to szło.
Dla mnie to czarna magia (ale założę sie, że przyczyną tego całego błędu jest moja głupota
)
Może ktoś pomóc? Jeśli tak to z góry dziękuję za pomoc
dodałem rodzaj tematu - Sej
no i mam problem w tym, ażeby grupy oddziałów stosowały sie do tzw. linebattle script
to jest ten skrypt (po otwarciu w notatniku):
- Kod: Zaznacz cały
; Line Battle Combat Script
; ==========
; Created by Majoris23 and ProfT
;
; This script creates the most realistic linear combat
; simulation currently available for Operation Flashpoint.
; This script was designed for the Civil War Mod
; (http://www.petrov-petrov.si/~triglav/CW/)
;
; How to Use
; ==========
; Put the following in the squad leader's init line
; [nameofgroup] exec "linebattle.sqs"
;
; By default, the squad's combat mode is set to BLUE
; (hold fire). When you want an AI squad to open fire,
; change it to RED... [groupname] setcombatmode "RED"
; This can be done at waypoints, for example.
;
; ==========
_group = _this select 0
_location = _this select 1
_leader = leader _group
_direction = (getdir _leader)
_officer = (units _group) select 0
_unit1 = (units _group) select 1
_unit2 = (units _group) select 2
_unit3 = (units _group) select 3
_unit4 = (units _group) select 4
_unit5 = (units _group) select 5
_unit6 = (units _group) select 6
_unit7 = (units _group) select 7
_unit8 = (units _group) select 8
_unit9 = (units _group) select 9
_leader AddAction ["Order: Crouch","lb_scripts\crouch.sqs"]
_leader AddAction ["Order: Stand","lb_scripts\stand.sqs"]
_leader AddAction ["Order: Fire Volley","lb_scripts\volley.sqs"]
_leader AddAction ["Order: Fire at will","lb_scripts\fireatwill.sqs"]
_leader AddAction ["Order: Cease fire","lb_scripts\hold.sqs"]
{_x allowfleeing 0} foreach units _group
_group setcombatmode "BLUE"
_angleU = 0
_x = 1
_y = 2
_z = 0
angle = getdir _officer
_xT = (getPos _officer) select 0
_yT = (getPos _officer) select 1
_zT = (getPos _officer) select 2
_x_original = _x
_y_original = _y
_zU = _zT + _z
_m_TO_SQUARE = (_x_original ^2) + (_y_original ^2)
_m = sqrt _m_TO_SQUARE
_x_with_diarrhea = _x_original * cos angle + _y_original * sin angle
_y_with_diarrhea = _y_original * cos angle - _x_original * sin angle
_x_rotated = _x_with_diarrhea + _xT
_y_rotated = _y_with_diarrhea + _yT
_x_position = ((_x_rotated - ((sin angle) * _m)))
_y_position = ((_y_rotated - ((cos angle) * _m)))
_unit1 setpos [_x_position, _y_position, _zU]
_unit1 setDir (_direction)
_unit2 setpos [(_xT + 2 *(_x_with_diarrhea - (sin angle * _m))), (_yT + 2 *(_y_with_diarrhea - (cos angle * _m))), _zU]
_unit2 setDir (_direction)
_unit3 setpos [(_xT + 4 *(_x_with_diarrhea - (sin angle * _m))), (_yT + 3 *(_y_with_diarrhea - (cos angle * _m))), _zU]
_unit3 setDir (_direction)
_unit4 setpos [(_xT + 6 *(_x_with_diarrhea - (sin angle * _m))), (_yT + 4 *(_y_with_diarrhea - (cos angle * _m))), _zU]
_unit4 setDir (_direction)
_unit5 setpos [(_xT + 8 *(_x_with_diarrhea - (sin angle * _m))), (_yT + 5 *(_y_with_diarrhea - (cos angle * _m))), _zU]
_unit5 setDir (_direction)
_unit6 setpos [(_xT + 10 *(_x_with_diarrhea - (sin angle * _m))), (_yT + 6 *(_y_with_diarrhea - (cos angle * _m))), _zU]
_unit6 setDir (_direction)
_unit7 setpos [(_xT + 12 *(_x_with_diarrhea - (sin angle * _m))), (_yT + 7 *(_y_with_diarrhea - (cos angle * _m))), _zU]
_unit7 setDir (_direction)
_unit8 setpos [(_xT + 14 *(_x_with_diarrhea - (sin angle * _m))), (_yT + 8 *(_y_with_diarrhea - (cos angle * _m))), _zU]
_unit8 setDir (_direction)
_unit9 setpos [(_xT + 16 *(_x_with_diarrhea - (sin angle * _m))), (_yT + 9 *(_y_with_diarrhea - (cos angle * _m))), _zU]
_unit9 setDir (_direction)
dostop [_unit1,_unit2,_unit3,_unit4,_unit5,_unit6,_unit7,_unit8,_unit9]
~.5
#loop
_officer = (leader _group)
? !(alive _officer): exit
? (_unit1 != player) and (alive _unit1) and (speed _officer > 0): _unit1 switchmove "standWalkF";_unit1 setdir (getdir _officer)
? (_unit2 != player) and (alive _unit2) and (speed _officer > 0): _unit2 switchmove "standWalkF";_unit2 setdir (getdir _officer)
? (_unit3 != player) and (alive _unit3) and (speed _officer > 0): _unit3 switchmove "standWalkF";_unit3 setdir (getdir _officer)
? (_unit4 != player) and (alive _unit4) and (speed _officer > 0): _unit4 switchmove "standWalkF";_unit4 setdir (getdir _officer)
? (_unit5 != player) and (alive _unit5) and (speed _officer > 0): _unit5 switchmove "standWalkF";_unit5 setdir (getdir _officer)
? (_unit6 != player) and (alive _unit6) and (speed _officer > 0): _unit6 switchmove "standWalkF";_unit6 setdir (getdir _officer)
? (_unit7 != player) and (alive _unit7) and (speed _officer > 0): _unit7 switchmove "standWalkF";_unit7 setdir (getdir _officer)
? (_unit8 != player) and (alive _unit8) and (speed _officer > 0): _unit8 switchmove "standWalkF";_unit8 setdir (getdir _officer)
? (_unit9 != player) and (alive _unit9) and (speed _officer > 0): _unit9 switchmove "standWalkF";_unit9 setdir (getdir _officer)
~.8
goto "loop"
Wstawiłem sobie oddział na mapę, dałem mu niedaleko punkt trasy, i w polu inicjacji dowódcy wpisałem to, co było podane (jako totalny żółtodziób w majstrowaniu przy opfie nie miałem pojęcia skąd dowiedziec wartości w polu [nameofgroup], więc próbowałem kolejno wpisywac "this", "1", "alphablack1")

za każdym razem jak robiłem podgląd jednostka biegła do punktu tak jak zawsze(normalnie), a u góry ekranu wyskakiwał taki bląd
- Kod: Zaznacz cały
'_location=_this select 1|#|': Error select: typ liczba, powinien byc macierz
Tak to szło.

Może ktoś pomóc? Jeśli tak to z góry dziękuję za pomoc
dodałem rodzaj tematu - Sej