OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: WizzyWig on 17 Mar 2004, 19:40:44

Title: MP TOMAHAWK PROBLEM
Post by: WizzyWig on 17 Mar 2004, 19:40:44
Hi me again im have a bit of a problem with mp useing our tomahawk the problem is:

the tomahwk fires and creats its self like it should but the cam created ai will not get in tomahawk it works perfect in single player but i would like it to work in both please if any one can help let me know thanks


how its set up is with a marker called launch
and a LST
NAME = LST1
init = LST=group this

ok this is part of our script
Code: [Select]
_leader = LST1
_group = LST

_leaderpos = getpos _leader
_posX = _leaderpos select 0
_posY = _leaderpos select 1
_posZ = _leaderpos select 2

_rand = (random 20)
_leaderX = _posX+_rand
_leaderY = _posY+_rand

_posfinal = [_leaderX,_leaderY,_posZ]

"SoldierWPilot" createunit [_posfinal,_group,"tmhwkpilot = this",1,"Private"]
~0.001
;END OF MAKE AI
_craft = "Tomahawkwiz" createVehicle getMarkerPos "Launch"
_craft setPos [(getPos _craft select 0),(getPos _craft select 1),(getPos _craft select 2)+0]
~0.001

tmhwkpilot assignAsDriver _craft
tmhwkpilot moveInDriver _craft
Title: Re:MP TOMAHAWK PROBLEM
Post by: Artak on 19 Mar 2004, 06:41:14
I see nothing wrong in the script. What if you'd try and make the local variable _craft into a global varaible craft.
And isn't this line useless?
Code: [Select]
_craft setPos [(getPos _craft select 0),(getPos _craft select 1),(getPos _craft select 2)+0]
Title: Re:MP TOMAHAWK PROBLEM
Post by: WizzyWig on 19 Mar 2004, 17:19:52
the craft spawns perfectly its the ai that dont work in MP its oly a mp problem