Jump to content
Sign in to follow this  
Xantam

SQF Script working in PREVIEW but not in MULTIPLAYER

Recommended Posts

Hi everyone !

I'm creating my first coop mission for 3 players. So far, everything works fine in Preview Mode (Editor).

I exported the mission to "multiplayer missions".

I created an empty object (Cargo Box), added an action on it with addAction. In Preview Mode, it gives weapons and stuff to the player who activates (according to his NAME on the EDIT UNIT section).

this hideObject true; this addAction ["Récupérer votre équipement","recupGear.sqf",[],6,true,true,"","(_target distance _this)<3"]

This is what i wrote in the INIT section of the Cargo Box (and it works just fine).

When i try to use this action on LAN or INTERNET, i can see the action in the scroll menu but the .sqf does nothing. Arma 3 does not show any error (i use -showScriptErrors).

My first thought was "Ok, maybe the .sqf path is wrong" but in MPMissions, everything is exported as a .pbo file so the path had to be right.

I'm new at this (obviously) and i could use some help to understand. Thanks ! :)

Edited by Xantam
Fixed CODE

Share this post


Link to post
Share on other sites

You should probably post your .sqf script.

I'm guessing you had "this addAction" in front of that code as well.

Share this post


Link to post
Share on other sites

Try executing it via init.sqf like this :

Name the object in the editor "crate" and then put this in a init.sqf file :

crate hideObject true; crate addAction ["Récupérer votre équipement","recupGear.sqf",[],6,true,true,"","(_target distance _this)<3"]

Edited by Dirty Haz
Updated

Share this post


Link to post
Share on other sites

Did you try what I said mate ? I doubt it will work but its worth a try... :D

Share this post


Link to post
Share on other sites

Not his SQF is to blame for that. The problem is the "export" function. It only packs the default files in the .pbo all custom files and scripts are left out.

Use an external pbo-programm and pack the mission folder manually. That will solve your problem.

Share this post


Link to post
Share on other sites

I would recommend using Eliteness which can be found/downloaded from here.

Share this post


Link to post
Share on other sites
Not his SQF is to blame for that. The problem is the "export" function. It only packs the default files in the .pbo all custom files and scripts are left out.

Use an external pbo-programm and pack the mission folder manually. That will solve your problem.

Uhm, no? I've always used the export to multiplayer function. Never ever had any problems with it.

Share this post


Link to post
Share on other sites

The export function is just fine. It simply converts the .stratis folder into .pbo and leaves everything inside as it is. The problem here should be as simple as locality, as far as I can tell. Please post your recupGear.sqf.

Share this post


Link to post
Share on other sites

To continue on the export function discussion, make sure that you do not rename the mission in the editor, that would be the cause to not having your scripts exported.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×