![]() |
|
|
|
#1
|
|||
|
|||
|
Quote:
Does GamePlay.gpFrontArmy(bp.Pos().x, bp.Pos().y) work at any point of map or only at frontline/border? Where can I see the complete list of such commands/functions like GamePlay.gpFrontArmy(bp.Pos().x, bp.Pos().y)? Should I add some game files to my project in Visual Studio? Till now I only opened separate .cs files with it. |
|
#2
|
|||
|
|||
|
Quote:
Visual Studio will let you see all of the methods in roundabout way. Try this: 1. File >> New >> Project Type in a name and solution name at the bottom. Don't worry about what kind of project you create. 2. On the right side under "Solution Explorer", right click on "References", "Add Reference..." 3. Click on the "Browse" tab, navigate to "Steam/steamapps/common/il-2 sturmovik cliffs of dover/parts/core" 4. Go through each .dll file in that list and try to add it. Some will give you an error, just skip those. After you've added all the .dll files, right click on the name of your project and do "Add Existing Item". Find one of your script files and add it. Now Visual Studio will show you all the possible methods as you're typing your code. You can also go to View >> Object Browser and have a look in there. Important: When you import an existing item, Visual Studio makes a copy of the file so any changes you make won't be reflected in the original file, you'll have to copy the new one over it. If anybody knows how to change this, I'd be quite grateful. |
|
#3
|
|||
|
|||
|
Thanks a lot for detailed explanation.
BTW did you see the scripting in this mission from the devs http://forum.1cpublishing.eu/showpos...&postcount=133 I was reading it yesterday and it just blows my mind away. There are some great pieces everyone should use: - airfield capture with removal of old arty - generating triggers names with variables (string str = "changeArmy" + i.ToString() + "_" + (j).ToString() - generating waypoints for bombers to attack the most close ground target - scoring system etc. I'll try to convert this mission to the Channel map when I have time. Probably will need a lot of help on C# )) Devs confirmed that there is a bug not allowing to use captured airfields before switching sides. They are working on it. |
|
#4
|
|||
|
|||
|
Quote:
I've only glanced at that mission, but I've already learned a few things that will make things easier. |
|
#5
|
||||
|
||||
|
I'm having trouble giving messages to a particular side under OnTickGame because I don't know how to find out which side I am on (" 'aircraft' is not valid in this context"). Any ideas please?
Code:
public override void OnTickGame()
{
if (Time.tickCounter() % 115200 == 1980) // Testing, reduced to 1 min. 1980 = 60secs delay.
{
GamePlay.gpHUDLogCenter("1 minute Timetick message.");
//issue message after further 30 seconds (test)
double initTime = 0.0;
Timeout(initTime += 30, () =>
if (aircraft != null) //error the name aircraft does not exist in the current context
{
switch (aircraft.Army()) {
case 1:
{ GamePlay.gpHUDLogCenter("Red side message."); }
break;
case 2:
{ GamePlay.gpHUDLogCenter("Blue side message"); }
break;
}
});
}
}
__________________
klem 56 Squadron RAF "Firebirds" http://firebirds.2ndtaf.org.uk/ ASUS Sabertooth X58 /i7 950 @ 4GHz / 6Gb DDR3 1600 CAS8 / EVGA GTX570 GPU 1.28Gb superclocked / Crucial 128Gb SSD SATA III 6Gb/s, 355Mb-215Mb Read-Write / 850W PSU Windows 7 64 bit Home Premium / Samsung 22" 226BW @ 1680 x 1050 / TrackIR4 with TrackIR5 software / Saitek X52 Pro & Rudders |
|
#6
|
|||
|
|||
|
I am trying to build a Falcon 4 type game where Germans advance towards cahnnel and English must drive them back.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|