01-12-2010, 04:15 AM
(This post was last modified: 01-12-2010, 07:54 PM by RKDmitriyev.)
(01-11-2010, 11:05 PM)Overlord link Wrote: Search your MPMissionsCache for co16_wgl_liberation_of_loukov.noe and check out the spawning scrip inside (makesquad).
Are you sure that script works Overlord? ??? I copied co16_wgl_liberation_of_loukov.noe from my MPMissionsCache, decrypted the PBO, opened "makesquad.sqs", and there seems to be at least one error that keeps it from working.
_group is being used inconsistently as an object or a group, and this results in "type group, expected object" errors, and no units are created. I verified this in the mission editor.
Note the getpos and group commands that are being directed at _group, but it is also used to define the group for createUnit.
Code:
;Create a lock in case our calling script needs to wait for our completion
MakeSquad = true
;Get args
_squadtype = _this select 0
_group = _this select 1
_behaviour = _this select 2
_combatmode = _this select 3
_formation = _this select 4
;Loop through _squadtype reading in each unit and creating it
_itemnum = 0
#MakeSquad
_unit = _squadtype select _itemnum
_unitClass = _unit select 0
_unitCount = _unit select 1
_unitType = _unit select 2
_unitInit = _unit select 3
_unitSkill = _unit select 4
_unitRank = _unit select 5
_count = 0
#CreateUnit
_unitClass createUnit [getpos _group, _group, _unitInit, _unitSkill, _unitRank]
_count = _count + 1
; small delay to avoid server lag
~0.2
?(_count < _unitCount): goto "CreateUnit"
_itemnum = _itemnum + 1
?(_itemnum < count _squadtype): goto "MakeSquad"
;Set the various group attributes with some delays to avoid server lag
~1
group _group setbehaviour _behaviour
~2
group _group setcombatmode _combatmode
~2
group _group setformation _formation
~1
;Remove lock
MakeSquad = False
exit
EDIT: This mission appears to be extremely temperamental. I just played it twice and saw extremely little lag. ???
I deem this mission ready for normal play on the server. It's much readier than the dozens of broken ones we have lying around.
R. Kurtz "Koortz" Dmitriyev
My methods have become "unsound."
My methods have become "unsound."