#1
|
|||
|
|||
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!! |
#2
|
||||
|
||||
Quote:
Code:
static string SubMissionsPath = @"missions\Multi\Dogfight\test\subs\"; static string RandomSubMissionsPath = @"missions\Multi\Dogfight\test\subs\random\"; Quote:
Code:
static string docpath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); static string pathCoD = docpath + @"\1C SoftClub\il-2 sturmovik cliffs of dover\missions"; Quote:
Quote:
So your mainmission is number 0 and every mission you load in that mission, gets a missionnumber++. |
#3
|
|||
|
|||
WOW!!
Thanks Kodiak !! all is clear!! thanks very much! |
#4
|
|||
|
|||
And another question
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!! |
#5
|
|||
|
|||
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. |
#6
|
|||
|
|||
Thanks again Kodiak!
So, I'm right!?, some events only works in singleplayer and others in multiplayer, it's ok? |
#7
|
|||
|
|||
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.
|
#8
|
|||
|
|||
oh! ok ok, I understand! , thanks Kodiak!!
|
|
|