![]() |
Some questions newbie scripter
Hi scripters! ;)
I have a couple of question, i will try to explain myself, sorry by my awful english. I don't want to specify the path to my submission folder like: GamePlay.gpPostMissionLoad("missions/<directory_to_my_mission>/submision.mis"); It's possible to specify a relative path? always must to be absolute path? Exist any function which can return the absolute path?, something like this: battleScriptFileName() , but doesn´t work , at least I can´t do it, my script GamePlay.battleScriptFileName() doesn´t work, any idea? And another question... CoD have any "error.log" for debugging the scripting error?, like "you have an error in line 42" ?? Finally, where can I find an explanation about the parameter "int missionNumber" in some functions like OnTrigger(int missionNumber, string shortName, bool active) ?? , I don´t understand what mean this parameter and his use. Thanks very much!! |
Quote:
Code:
static string SubMissionsPath = @"missions\Multi\Dogfight\test\subs\"; Quote:
Code:
static string docpath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); Quote:
Quote:
So your mainmission is number 0 and every mission you load in that mission, gets a missionnumber++. |
WOW!! :o
Thanks Kodiak !! all is clear!! thanks very much! :razz: |
And another question :grin:
Is possible that some functions are executed in singleplayer and anothers in multiplayer?? I think that OnAircraftTookOff, OnAircraftLanded or OnAircraftCrashLanded only is executed only in singleplayer, it's possible? Thanks!! |
You can check (bool)
GamePlay.gpIsServerDedicated(); GamePlay.gpIsServerSingle(); but by a SingleplayerGame GamePlay.gpIsServerSingle() is also true. So you should check if GamePlay.gpRemotePlayers() contains Players, if so its a MultiplayerGame if not its a SinglePlayer. |
Thanks again Kodiak!
So, I'm right!?, some events only works in singleplayer and others in multiplayer, it's ok? |
Yes but it's depens on the patch version. So if the events dont work in multiplayer call them bugs ;), may be they work again in later patch versions.
|
Quote:
|
All times are GMT. The time now is 11:44 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.