vehicle spawn script |
vehicle spawn script |
Sep 20 2009, 22:04
Post
#1
|
|
Senior Member Group: Addon Maker Posts: 201 Joined: 9-October 07 Member No.: 1,420 |
In arma 1 i used these 2 sqs (i know i need to convert them to sqf someday) to spawn extra hardware from a salvage truck in the mission.
CODE _unit = _this select 0 _type = typeof _unit _n = 0 ?(_type == "truck5treammo"): Goto "actionadd" #actionadd action1 = _unit addaction ["Deploy A-10","scripts\deploy.sqs","UAZ"] action2 = _unit addaction ["Deploy AH1Z","scripts\deploy.sqs","AH1Z"] action3 = _unit addaction ["Deploy AV8B Bomber","scripts\deploy.sqs","AV8B2"] action4 = _unit addaction ["Deploy AV8B LGB","scripts\deploy.sqs","AV8B"] action5 = _unit addaction ["Deploy F-35 Lightning","scripts\deploy.sqs","F35B"] action6 = _unit addaction ["Deploy MV-22","scripts\deploy.sqs","MV22"] action7 = _unit addaction ["Deploy UH-1Y","scripts\deploy.sqs","UH1Y"] action8 = _unit addaction ["Deploy C-130J","scripts\deploy.sqs","C130J"] exit CODE _veh = _this select 3 ?(_veh == "A10") : goto "A10" ?(_veh == "AH1Z") : goto "AH1Z" ?(_veh == "AV8B2") : goto "AV8B2" ?(_veh == "AV8B") : goto "AV8B" ?(_veh == "F35B") : goto "F35B" ?(_veh == "MV22") : goto "MV22" ?(_veh == "UH1Y") : goto "UH1Y" ?(_veh == "C130J") : goto "C130J" Exit #A10 _unit = player _unitpos = getpos _unit _uX = _unitpos select 0 _uY = _unitpos select 1 _uZ = _unitpos select 2 _hmg = "A10" createvehicle [_uX+1,_uY+1,_uZ] _hmg addEventHandler ["killed",{_this exec "scripts\killed.sqs"}] exit #AH1Z _unit = player _unitpos = getpos _unit _uX = _unitpos select 0 _uY = _unitpos select 1 _uZ = _unitpos select 2 _hmg = "AH1Z" createvehicle [_uX+1,_uY+1,_uZ] _hmg addEventHandler ["killed",{_this exec "scripts\killed.sqs"}] exit #AV8B2 _unit = player _unitpos = getpos _unit _uX = _unitpos select 0 _uY = _unitpos select 1 _uZ = _unitpos select 2 _hmg = "AV8B2" createvehicle [_uX+1,_uY+1,_uZ] _hmg addEventHandler ["killed",{_this exec "scripts\killed.sqs"}] exit #AV8B _unit = player _unitpos = getpos _unit _uX = _unitpos select 0 _uY = _unitpos select 1 _uZ = _unitpos select 2 _hmg = "AV8B" createvehicle [_uX+1,_uY+1,_uZ] _hmg addEventHandler ["killed",{_this exec "scripts\killed.sqs"}] exit #F35B _unit = player _unitpos = getpos _unit _uX = _unitpos select 0 _uY = _unitpos select 1 _uZ = _unitpos select 2 _hmg = "F35B" createvehicle [_uX+1,_uY+1,_uZ] _hmg addEventHandler ["killed",{_this exec "scripts\killed.sqs"}] exit #MV22 _unit = player _unitpos = getpos _unit _uX = _unitpos select 0 _uY = _unitpos select 1 _uZ = _unitpos select 2 _hmg = "MV22" createvehicle [_uX+1,_uY+1,_uZ] _hmg addEventHandler ["killed",{_this exec "scripts\killed.sqs"}] exit #UH1Y _unit = player _unitpos = getpos _unit _uX = _unitpos select 0 _uY = _unitpos select 1 _uZ = _unitpos select 2 _hmg = "UH1Y" createvehicle [_uX+1,_uY+1,_uZ] _hmg addEventHandler ["killed",{_this exec "scripts\killed.sqs"}] exit #C130J _unit = player _unitpos = getpos _unit _uX = _unitpos select 0 _uY = _unitpos select 1 _uZ = _unitpos select 2 _hmg = "C130J" createvehicle [_uX+1,_uY+1,_uZ] _hmg addEventHandler ["killed",{_this exec "scripts\killed.sqs"}] The problem im having is in arma1 the script worked to spawn the item a few meters away from the TRUCK the script was attached too. In arma2 it drops the vehicle straight on the PLAYER.... Now to solve this i would like to adjust the script so it spawns the the vehicles at a H named DEPLOY_1. Can anyone please help me? Im not sure exactly how to write it. -------------------- wld427 on BI forums
|
|
|
Lo-Fi Version | Time is now: 20th April 2024 - 04:01 |