OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: Mr.Peanut on 01 Jul 2009, 00:40:52

Title: Norrin's Ramp Script
Post by: Mr.Peanut on 01 Jul 2009, 00:40:52
Has anyone else taken a look at Norrin's C-130 ramp script? I fail to see how it would work in MP unless there have been significant scripting changes in ArmA2. First off, I thought (erroneously?) that the animate command was local. Secondly, I see no MP linkage in his addAction initiated script to sync the adding/removing of actions or the state of his vehicle stored variables. (Has anyone coined a nice short term for "vehicle stored variables"?)

Not only that, but why does he start his initialisation script by adding actions, and then promptly deleting them?
Title: Re: Norrin's Ramp Script
Post by: Spooner on 01 Jul 2009, 01:58:42
Well, they can't really be called "vehicle variables" any more, since they can now be added to groups, namespaces and locations (and possibly other things that I've forgotten about).

Erm, why are you asking us about a script that hasn't even been released at OFPEC, rather than just asking Norrin directly if you have problems? At the very least, you could link it (http://forums.bistudio.com/showthread.php?t=74162) so we actually knew what you were talking about.

* Regarding the MP aspects, I don't see Norrin specifically claiming MP compatibility in the release. However, at least according to the BIKI, animate  (http://community.bistudio.com/wiki/animate)has a fully global effect.
* "attributes" that he uses are properly synced (there is a new 3rd parameter to setVariable in A2 in order to enable this).
* There's no godly reason why the actions are all added then immediately removed!
* Rather than continually adding and removing the actions, it would be simpler to use the A2 action condition (http://community.bistudio.com/wiki/addAction) (same as the A1 action condition, but it can be applied in scripts as well as in config). I'd also prevent people outside the vehicle opening and closing the doors, but that is my choice:
Code: (Either open or close action, as appropriate, available for anyone in the vehicle) [Select]
_vcl addAction ["Open C-130 doors", "C130_openDoor\openDoor.sqf", "", 0, false, true, "(not (_target getVariable 'NORRN_openDoor')) and (_this in _target)"];
_vcl addAction ["Close C-130 doors", "C130_openDoor\closeDoor.sqf","", 0, false, true, "(_target getVariable 'NORRN_openDoor') and (_this in _target)"];

Regardless: hey hey Mr Peanut! Haven't seen you around for a long time; I hope you are back to stay with us in Arma 2 land...
Title: Re: Norrin's Ramp Script
Post by: Rommel92 on 10 Jul 2009, 02:24:48
<Won't hijack thread>
Title: Re: Norrin's Ramp Script
Post by: Mr.Peanut on 10 Jul 2009, 19:21:16
Although not hosted on OFPEC, it was reported here (http://www.ofpec.com/intel_depot/index.php?action=list&year=2009&month=Jun) in the Intel depot.

[Way Off Topic]I've been skulking around a little, but since I never played ArmA I lost all interest. Now with a new rig, I'll see what ArmA2 is like when it is released way over here in the colonies.  I don't game very much anymore, except for roguelikes.[/Way Off Topic]

Wonder if BIS ever fixed the leader command in MP...