Page MenuHomeFeedback Tracker

Custom CO-OP Mission: Triggers spawn units twice
Closed, ResolvedPublic

Description

Hello, I created a SP/CO-OP mission with 2 playable units. It works like a charm except the lack of usefull features/commands for mission makers.

Anyways, when i tested it with a friend via LAN, some triggers seems to activate once, but for every player. So in this mission, every group is created twice since there are two players present.

EVERY Trigger that uses spawnGroup, created units twice AND executed the rest of the activation code as well, such as assigning the freshly spawned group a waypoint.

I don't know what happens there and I could only try it once, since I only have one pc that can run the game at the moment.

Am I missing something about those commands being not multiplayer compatible?

I can upload the mission file, but I would have to re-write the tasks and such, as it is in German.

PS: Every Trigger was created within the editor, the only extern scripted lines are unitPlay and the basic Description.ext

Details

Legacy ID
1725176562
Severity
None
Resolution
No Bug
Reproducibility
Have Not Tried
Category
Multiplayer
Additional Information

Both PCs are running Arma 3, not the Dev version.

Only spawnGroup Units are created twice, the editor placed units are fine.

Chat-Triggers that check the death of the spawned units are triggered locally, so I see "..." when group1 is dead. And the other pc sees the same "..." when the "cloned" group1 is dead.

Triggers for both players being in a certain area at the same time work perfectly and immediately.

Event Timeline

Sgt_Cold edited Additional Information. (Show Details)
Sgt_Cold set Category to Multiplayer.
Sgt_Cold set Reproducibility to Have Not Tried.
Sgt_Cold set Severity to None.
Sgt_Cold set Resolution to No Bug.
Sgt_Cold set Legacy ID to 1725176562.May 7 2016, 7:53 PM
Sgt_Cold added a subscriber: Sgt_Cold.

I have no clue who downvoted this, if you have advice on how to fix this problem, fell free to add a note. There is no reason to vote this down. If this is a problem that is often reported by amateurs, so be it, just say it. Maybe provide a link to a solution? Don't be a jerk.

Triggers are created on every machine, that is to say their code will be executed on every machine when activated.

It sounds like you're running into a simple locality issue.

I have no idea what the spawnGroup command is (as far as I know there is no such thing), but you basically need to enclose your code in:

if isServer then {
<your code here>
};

I downvoted because this isn't really something that belongs on the tracker, the forums are a better place for solving mission making issues. Sorry I didn't have time to write a reply at the time.

Edit: Another solution is to edit the condition field of the trigger to say "this and isServer" - probably the simplest solution really

Hey thanks for answering!

I thought it was some kind of locality problem, but then i dont get why other triggers, that spawn text using sideChat, dont trigger twice? That is what had concerned me the most. Do you maybe have an explanation for that too?

The spawnGroup command is basically the script equvivalent to the editor F2 function (add preconfigured groups). But you can tweak certain variables, like skill range, rank of units, etc. by giving them to the function. Quite usefull if you want to spawn those groups after initializing the mission.

Thank you for giving that important info that appearently can't be found elsewhere..i've been searching for 2 hours on various forums...

I'm going to try it right away and report back in a few minutes.

Side chat only works on client so you dont see the server execution. As it has been pointed, it is not a bug, you should getter a better response on the forums.

"If you want the message to show on all computers, you have to execute it on all of them." -Wiki

I just read that. I seem to have overlooked that part...thanks Killzone_Kid for pointing that out!

I guess this can be closed now.