Forum Jump :

Author Message


Posts: 1
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2010-04-01 08:49        
     
EDIT: If you saw this as a blank post is cause an error with my slow ass internet right now

Hello, (Again -- silly internet connection)

I'm trying to use addaction scripts to make several (empty) vehicle spawn points in my map. They work fine in SP/Preview, but once i take them to MP noone else can access the commands, although they can interact with vehicles I spawn.

I've done enough searching to know that addactions only execute locally and thats probably part of my problem.
There are some other problems i've heard about i'd like to avoid (haven't had them yet myself).
1 - Everyone being able to see the addaction command when one person is at the controller.
2 - I read something somewhere about a setup where everyone could spawn vehicles but noone could see/interact with anyone else's vehicles, something the solution being gamelogic, publicvariable and adding to "allvehiclesspawned []" array

I have 6 sets of 2 scripts each for Fixed Wing, Attack Rotor Wing, Transport Rotor Wing, Armoured, Wheeled, and Static. They all function in the same way.

Each set of scripts has in the map 'H (invisible)' as a controller (name example: FWcont w/ [this] exec "addaction_fws.sqs" in the init line) and another 'H' (either civilian or invisible depending on location) as the spawn point (example name: FixedWingSpawn)

I think I may need to use a trigger field or publicvariable but i'm not sure how to, here are my Fixed Wing scripts:

addaction_fws.sqs
_FWcont = _this select 0
_unit = player
_n = 0

#checkdistancenear
?((_unit distance _FWcont)<5): goto "actionadd"
~0.2
goto "checkdistancenear"

#actionadd
action1 = _unit addaction ["Deploy SuperHornet","deployfws.sqs","D30"]
action2 = _unit addaction ["Deploy A10 Bomb","deployfws.sqs","AGS"]
action3 = _unit addaction ["Deploy A10 CAS","deployfws.sqs","A10"]
action4 = _unit addaction ["Deploy Nighthawk GBU","deployfws.sqs","Kiowa"]
action5 = _unit addaction ["Deploy Nighthawk AGM","deployfws.sqs","Hawk"]
action6 = _unit addaction ["Deploy Harrier AGM","deployfws.sqs","Bird"]
action7 = _unit addaction ["Deploy Harrier GBU","deployfws.sqs","Dog"]
action8 = _unit addaction ["Deploy C130 (Field)","deployfws.sqs","Bomb"]
#checkdistancefar
?((_unit distance _FWcont)>=5): goto "exit"
~0.2
goto "checkdistancefar"

#exit

player removeaction action1
player removeaction action2
player removeaction action3
player removeaction action4
player removeaction action5
player removeaction action6
player removeaction action7
player removeaction action8

#realexitwith
_n = 0
? ((_unit distance _FWcont) < 5): goto "actionadd"
~0.2
goto "realexitwith"

and deployfws.sqs
_veh = _this select 3
?(_veh isKindOf "D30") : goto "deployD30"
?(_veh isKindOf "AGS") : goto "deployAGS"
?(_veh isKindOf "A10") : goto "deployA10"
?(_veh isKindOf "Kiowa") : goto "deployKiowa"
?(_veh isKindOf "Hawk") : goto "deployHawk"
?(_veh isKindOf "Bird") : goto "deployBird"
?(_veh isKindOf "Dog") : goto "deployDog"
?(_veh isKindOf "Bomb") : goto "deployBomb"
exit

#deployD30
_unit = player
_unit removeAction action1
_loc = getPos FixWingSpawn
_uX = _loc select 0
_uY = _loc select 1
_uZ = _loc select 2
_hmg = "fz_f18e_aws" createvehicle [_uX,_uY,_uZ]
exit

#deployAGS
_unit = player
_unit removeAction action2
_loc = getPos FixWingSpawn
_uX = _loc select 0
_uY = _loc select 1
_uZ = _loc select 2
_hmg = "ACE_A10_MK82" createvehicle [_uX,_uY,_uZ]
exit

#deployA10
_unit = player
_unit removeAction action3
_loc = getPos FixWingSpawn
_uX = _loc select 0
_uY = _loc select 1
_uZ = _loc select 2
_hmg = "ACE_A10_AGM_FFAR" createvehicle [_uX,_uY,_uZ]
exit

#deployKiowa
_unit = player
_unit removeAction action4
_loc = getPos FixWingSpawn
_uX = _loc select 0
_uY = _loc select 1
_uZ = _loc select 2
_hmg = "USEC_F117_GBU12" createvehicle [_uX,_uY,_uZ]
exit

#deployHawk
_unit = player
_unit removeAction action5
_loc = getPos FixWingSpawn
_uX = _loc select 0
_uY = _loc select 1
_uZ = _loc select 2
_hmg = "USEC_F117_AGM65" createvehicle [_uX,_uY,_uZ]
exit

#deployBird
_unit = player
_unit removeAction action6
_loc = getPos FixWingSpawn
_uX = _loc select 0
_uY = _loc select 1
_uZ = _loc select 2
_hmg = "ACE_AV8B_AGM65" createvehicle [_uX,_uY,_uZ]
exit

#deployDog
_unit = player
_unit removeAction action7
_loc = getPos FixWingSpawn
_uX = _loc select 0
_uY = _loc select 1
_uZ = _loc select 2
_hmg = "ACE_AV8B_GBU12" createvehicle [_uX,_uY,_uZ]
exit

#deployBomb
_unit = player
_unit removeAction action8
_loc = getPos C130Spawn
_uX = _loc select 0
_uY = _loc select 1
_uZ = _loc select 2
_hmg = "USEc_C130" createvehicle [_uX,_uY,_uZ]
exit

And yeah the funny names like "D30, AGS, Kiowa, Bird, Dog, Bomb, etc..." were the only way I could get these scripts working, think it has to do something with the communication of the value from 1st script to 2nd one.... It wouldn't seem to want to recognize other values I used at the ends of the addactions...

Can someone tell me how to make these work properly in MP?
Any help would be appreciated.

This post was edited by LtGreen649 (2010-04-01 09:08, ago)