OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Janne on 24 Oct 2003, 18:55:55

Title: Script not found in a multiplayer game
Post by: Janne on 24 Oct 2003, 18:55:55
I made a multiplayer map with a script which does a better explosion. The script was in my mission folder in a subfolder named "effects". When I exported the map to multiplayer and tried to play it with my friend, it said that the script file couldn't found. That's why the script isn't working in multiplayer. What should I do? Please help! ???
Title: Re:Script not found in a multiplayer game
Post by: Hawkins on 24 Oct 2003, 19:05:48
How do you execute the script? The way I use scripts from subfolders is

[] exec "FX\fire.sqs"

And it works. Do you have an \ at the start? That might be causing the problem. :-\

Hawkins
Title: Re:Script not found in a multiplayer game
Post by: Janne on 24 Oct 2003, 19:09:12
I execute it like this: this exec "effects/destroyed.sqs". It's in effects subfolder in the misson folder. But when we tried to play the map with my friend it said "script "effects/destroyed.sqs" not found. Then we had to play without the "destroyd" effect.  :(
Title: Re:Script not found in a multiplayer game
Post by: Hawkins on 24 Oct 2003, 19:11:47
Hmm try using \ instead of / ? :P I think that's it. :)

Hawkins
Title: Re:Script not found in a multiplayer game
Post by: Chris Death on 24 Oct 2003, 19:29:56
Let's see if this one may help here:

When exporting a mission to SP or MP, you MUST NOT
change the name of the map, otherwise only the
mission.sqm file will be exported  ;)

If you want to change the mission's name, you would
have to rename the name of the mission-folder, then load
the map into editor, and then export it.

~S~ CD
Title: Re:Script not found in a multiplayer game
Post by: Janne on 24 Oct 2003, 19:34:19
Hmm try using \ instead of / ? :P I think that's it. :)

Hawkins

Yeah. It was about that "\". Thank you for that. But there is another problem. There are two .sqs files; "destroyded.sqs" and "BSmoke.sqs". The destroyed.sqs works now (thanks to you :)) but when (e.x.) a tank is exploded it says "Couldn't find BSmoke.sqs". (BSmoke is a custom burning effect) If I put the filename in the initializion line, it executes it at the start of the level, which it shouldn't do. How I should fix this?
Title: Re:Script not found in a multiplayer game
Post by: Hawkins on 24 Oct 2003, 19:51:09
So you want the BSmoke.sqs to start when the tanks is exploded? If so, you could execute the script from the other script.

[] exec "effects\BSmoke.sqs"

IF it's in the effects folder. ;)

Hawkins
Title: Re:Script not found in a multiplayer game
Post by: Janne on 24 Oct 2003, 20:02:55
So you want the BSmoke.sqs to start when the tanks is exploded? If so, you could execute the script from the other script.

[] exec "effects\BSmoke.sqs"

IF it's in the effects folder. ;)

Hawkins

Now it works! I had forgot to replace the "/" with "\", in the destroyed.sqs, which activates the another script. Thank you for your help.
Title: Re:Script not found in a multiplayer game
Post by: Hawkins on 24 Oct 2003, 20:38:34
No problem! ;) I'm glad I could help. :)

Hawkins
Title: Re:Script not found in a multiplayer game
Post by: Janne on 24 Oct 2003, 22:10:02
No problem! ;) I'm glad I could help. :)

Hawkins

Btw...Little off topic, but do you happen to know how I can put a "crater object" in my map. There isn't a crater in presets. It can be done with a script, right? Tell me if you know.
Title: Re:Script not found in a multiplayer game
Post by: MI_Fred on 25 Oct 2003, 00:17:00
Presets? I hope your using Kegs editor addon, in it the crater has the classname AAA168 so you can just camCreate it with that name. Altho it is in the editor under Camera. Open up the editor addon config, lots of objects are behind straange names  ;)