Hi guy' s , glad that the forum is online again.
I am currently building an rts/shooter mission on opfl.
Each side has ONE money pool. But if a friend of mine builds something, his money decreases and mine remains the same.
How do I change it so if someone else buys something your money decreases too (public variable)?
kinda the same problem,
If a player builds a building, sometimes actions are added to them.
Only the person who has build the building ses them. How do you change it so others can too?
thnx for helping me out!
EDIT no II:
ok.. I' ve been digging into the site and found this command:
PublicVariable "VariableName"
I' m not sure but I think it will solve my shared money variable problem.
can I use this command for adding actions (for instance)
PublicVariable "actionheal"
actionheal= this addaction ["heal me","healme.sqs"]
This way, is everybody going to see the actions?
edit III:
ok... making actions public doesn' t work as strings can' t be public.
I ' ve modified my script:
if (WestRecource>499) then { goto "build" } else { goto "no" }
#build
PublicVariable "varPoshp"
varPoshp=[(varPosbuilder select 0) + 8, (varPosbuilder select 1) + 8]
helip= "HeliH" createvehicle varPoshp
;buildheli exec "hhelibuild.sqs"
_rearm = "Truck5tRepair" createvehicle [(varPoshp select 0) + 8, (varPoshp select 1)]
_rearm lock true
_refuel= "Truck5tRefuel" createvehicle [(varPoshp select 0), (varPoshp select 1) + 8]
_refuel lock true
_repair= "Truck5tRepair" createvehicle [(varPoshp select 0) + 8, (varPoshp select 1) + 8]
_repair lock true
WestRecource=WestRecource-500
WestPower=WestPower-150
hint "Helipad build"
goto "addaction"
#addaction
if (WestPower<0) then {goto "check"}
buh60 = helip addaction ["Build UH60 $200", "builduh60.sqs"]
bCobra= helip addaction ["Build Cobra $600", "buildcobra.sqs"]
#resah64
if (ResAH64==1) then {goto "addAH64"} else {goto "check"}
#check
~5
if (WestPower<0) then {goto "removeaction"} else {goto "live"}
#powercheck
~5
if (WestPower<0) then {goto "powercheck"} else {goto "addaction"}
#addAH64
bAH64= helip addaction ["Build Apache $1000", "buildah64.sqs"]
; removing AH64 tag, so it will be added once
ResAH64=2
goto "check"
#removeaction
helip removeaction buh60
helip removeaction bCobra
if (ResAH64==2) then {helip removeaction bAH64}
ResAH64=1
goto "powercheck"
;ending the script
#no
hint "not enough funds SIR"
exit
#live
~1
if (alive helip) then {goto "resah64"} else {goto "end"}
#end
WestPower=WestPower+150
#delveh
deletevehicle helip
deletevehicle _rearm
deletevehicle _repair
deletevehicle _refuel
exit
never mind all the loops... basically it says build some building and add some actions.
The building is created for every player... But only the builder get' s to se the actions...
1) How come?
2) my problem is still there :S
.. and I' m running out of idea' s...
hopefully someone can help me out while I grab a beer
thnx