![]() |
Great thread on searchlights and adding AA to trains and trucks
http://forum.1cpublishing.eu/showthr...t=22740&page=2 |
Quote:
WOW! I start getting depressed that flying at 400kmh, jinking like mad, the last thing I will want to do is looking a the detail of the AAA shooting at me.... :-) It looks as if the mission builders will have as much fun as the pilots with this sim... Great job, we will go throgh hell finding out about the details but, great job! Nice week end to all ! |
Ataros
thanks for all the scripting info. I am trying your tmp script with three sub missions. It gets as far as loading the first sub mission and then my plane explodes. The text message is shown in cockpit then boom! Please help. Disregard..pilot error :) GH |
Thanks for the thread Ataros. Very helpful.
Is there a reason you guys are using "ticks" to measure time. C# has a few different ways of keeping track of time. Here's an example using the Stopwatch class. Don't get me wrong, modulus is great but this stopwatch is probably more accurate and it's a heck of a lot more readable. :) Code:
using System; |
Quote:
If you want to get rid of counting ticks, you can use this: Code:
//Runs once, when mission is loaded |
Oh, I'm sorry. I thought that you guys wanted to base the intervals that missions run on on real time not on game time.
|
1 Attachment(s)
Okay. I think I've got a handle on how to create and manipulate "MissionMarkers" aka Front Markers in a script. I've attached a simple, commented example. Shoot down the bomber in front of you and the southwest airfield's front marker changes to blue.
Quote:
Do you have a link to a tutorial on how to create multiplayer missions? |
1 Attachment(s)
Quote:
When new submission is loaded it can contain a new moved frontline and a new birthplace (e.g. red one) in the location where the blue one used to be. The problem is the old birthplace is not removed by loading a new submission and blue aircraft still can be created in the newly captured red airfield. That is why you need to destroy an old blue birthplace with a script I guess: Code:
foreach (AiBirthPlace bp in GamePlay.gpBirthPlaces()) Ideally I would like to move the frontline and change side of these 2 birthplaces based on results of a recent submission. Say if reds loose more aircrafts or tanks (or more then say 70%) in recent mission reds loose an airfield in D3. If they win next mission they take it back, etc. and repeat it forever. In the future I believe this script can be used to move frontline across the whole map to create an ongoing war. Please find a recent version of my mission attached. |
Could some C# experts check this part of script for errors. Trying to randomize submission loading here. Thanks to Groundhog for idea.
Intended to run in cycle forever. Does not work for me ( Need help please. Code:
using System; |
Thanks for the help Ataros, I'll start experimenting with that right away.
As for your code, what exactly isn't working? I can tell you right now that case 3 will never run because the Next(int, int) method returns an integer greater than or equal to the smaller number, but only less than the larger number. In other words, it will never return three, just one or two. It should look like this: switch (RandomIncident.Next(1, 4)) See here: http://msdn.microsoft.com/en-us/library/2dx6wyd4.aspx |
All times are GMT. The time now is 05:39 AM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.