OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: BuhBye on 13 Oct 2007, 07:25:38

Title: Local, Global, OFP, ArmA
Post by: BuhBye on 13 Oct 2007, 07:25:38
I am by no means a scripting god, but I have gotten by for 5 years in OFP. I find myself really struggling in ArmA with local, global script issues. Issues that never seemed to be in OFP.

I went through the L, G learning curve in OFP and I seem to be in anther now.

Can anyone tell me if the rules have changed in ArmA. I hear some say "not at all" and some say "Its totally different. Cause Im with the latter.
Title: Re: Local, Global, OFP, ArmA
Post by: Chrispy on 13 Oct 2007, 07:57:55
I'm not too sure about this but I do know many scripts in OFP do WORK in ArmA, and ArmA does have a few scripts that OFP doesn't have (and so forth).

Correct me if I'm wrong, anyone.

Chris
Title: Re: Local, Global, OFP, ArmA
Post by: Mandoble on 13 Oct 2007, 10:40:42
The rules are the same, but there are many more commands in ArmA. The commands that affect vehicles or units may:
1 - require that the affected unit is local to the machine where the command is executed (for example, setVectorDir).
2 - apply the effects locally to the provided unit.

Commands that do not affect units may also have global or local effects, for example, the drop command has local effect, the particles will be "seen" only there where the command has been executed, its effects are not broadcasted, same for radio/chat or weather change commands.
Title: Re: Local, Global, OFP, ArmA
Post by: BuhBye on 13 Oct 2007, 19:16:15
I understand those Mandoble. But there are tons of thing Im finding that work in OFP but not in ArmA. IE "SetPos" and I also put up a script on here months ago that worked perfect in OFP and wont work at all in ArmA. I never got an answer as to why so I guess that is what spawned this question.
Title: Re: Local, Global, OFP, ArmA
Post by: h- on 13 Oct 2007, 19:55:16
IIRC setPos had some troubles in MP but it was fixed in 1.08 (or maybe in some earlier patch..).. :dunno:

What I find particularly annoying though is that even though eventHandlers are generally dubbed being global in MP it's not that simple.
The script executed by the eventHandler is strictly local to the unit triggering the EH and that may cause some serious gray hair if not aware of that..

At least I have experienced such a thing, but then again I'm pure crap at MP scripting so that may very well play a part in it  ::)
Title: Re: Local, Global, OFP, ArmA
Post by: BuhBye on 13 Oct 2007, 21:40:12
Maybe THAT! is my issue with the script I posted here and never got an answer on. All of the issues can be traced to the event handler not working! It works fine in SP and on a Local server but on a deticated server none of it works.

I wonder how many Local, Global issues are bugs.