#21
|
|||
|
|||
Quote:
30 tics a second give you 1800 tics per minute. if (Time.tickCounter() % 1200 == 0) 1200 - is cycle here 0 - is initial delay before running script. I'd suggest taking doghous3 script to start with and just change filenames in it to avoid simple mistakes. This is what I did with his mission. |
#22
|
|||
|
|||
Quote:
I double checked mine and doghouse's map.... neither planes load... the message pops up but thats it... i load on the game console and it mentions "load failed"... Any reason behind this :S? Steam and VAC? :S See attached picture Cycle here - ? whats that lol update Is this the part where it "reloads" itself? or "deletes" itself?? Cheers DOH - HANG ON A SEC LOL never laughed at myself so much... copy and paste - bad idea... forgot my sub folder in the line... all my own missions are saved in "Ross" folder... talk about wasting a few hours - ALL FIXED NOW Still need an answer on the cycle though! Last edited by mcler002; 04-26-2011 at 01:59 PM. |
#23
|
|||
|
|||
Quote:
By cycle I mean it reloads a 2nd mission (sub-mission) every 1200 ticks in this example that is every 40 seconds. |
#24
|
|||
|
|||
New version of "Battle of France"
Added guns to tankers. Spawns assigned to runways on some airfields. etc. |
#25
|
|||
|
|||
Thanks
Cheers for all your help, hopefully have a map to show soon!
|
#26
|
|||
|
|||
Good luck!
Last edited by Ataros; 04-27-2011 at 06:42 AM. |
#27
|
|||
|
|||
Delete AI after mission?
Ack next question
Any script or trigger to remove AI after mission? or should i just get them to RTB then "vanish"... Cheers |
#28
|
|||
|
|||
This is what I've made
Ok people
This is what i have made so far... 3 sub missions (b1 4xhe115 attack convoy, b2 8x he111 attack base, r1 12xblenheim attack base) So many things can be changed/ done differently after learning a few things about script... However, please feel free to have a look and make comments (bad or good!) All i really want to know now is: a) can you end the sub missions before the script starts the new one b) bring back destory "static" objects after "x" amount of time? Cheers Ross Note - If you are going to use my game maps, make sure you change the script directory for each sub mission!!! in "OnlineBoB" - Hope you understand!!! Last edited by mcler002; 04-26-2011 at 03:41 PM. |
#29
|
|||
|
|||
Quote:
I think a good idea would be to disable AI controls or kill engine with a script in 30 minutes after the last waypoint and destroy it 10 minutes later. We need such a script badly. Hope someone with C# knowledge can write it for us. Last edited by Ataros; 04-27-2011 at 06:46 AM. |
#30
|
|||
|
|||
My mission update
Update for my online map
not sure if the script for disabling ai controls works though :S Ross Code:
using System; using maddox.game; using maddox.game.world; using System.Collections.Generic; public class Mission : AMission { public override void OnTickGame() { if (Time.tickCounter() % 54000 == 18000) { GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/Ross/OnlineBOBb1.mis"); GamePlay.gpHUDLogCenter("Intel: 4x He115's, Heading for Convoy!"); } if (Time.tickCounter() % 99000 == 36000) { GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/Ross/OnlineBOBb2.mis"); GamePlay.gpHUDLogCenter("Intel: 8x He111's, Heading for Lympne!"); } if (Time.tickCounter() % 108000 == 27000) { GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/Ross/OnlineBOBr1.mis"); GamePlay.gpHUDLogCenter("Intel: 12xBlenheim, Heading for Calais Marck!"); } } // destroys aircraft abandoned by a player public void _DespawnEmptyPlane(AiActor actor) { if (actor == null) { return; } Player[] Players = GamePlay.gpRemotePlayers(); bool PlaneIsEmpty = true; foreach (Player i in Players) { if ((i.Place() as AiAircraft) == (actor as AiAircraft)) { PlaneIsEmpty = false; break; } } if ((PlaneIsEmpty) && (actor as AiAircraft).IsAirborne()) { (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsElevatorDisabled); (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsAileronsDisabled); (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsRudderDisabled); (actor as AiAircraft).hitNamed(part.NamedDamageTypes.Eng0TotalFailure); //for 2mots (actor as AiAircraft).hitNamed(part.NamedDamageTypes.Eng1TotalFailure); //then wait 1sec? Timeout(1.0, () => { (actor as AiAircraft).Destroy(); }); } else if (PlaneIsEmpty) { (actor as AiAircraft).Destroy(); } } public override void OnPlaceLeave(Player player, AiActor actor, int placeIndex) { base.OnPlaceLeave(player, actor, placeIndex); _DespawnEmptyPlane(actor); } // destroys crushlanded aircraft in 10 minutes public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft) { base.OnAircraftCrashLanded(missionNumber, shortName, aircraft); Timeout(600, () => { aircraft.Destroy(); }); } } Last edited by mcler002; 04-28-2011 at 03:56 PM. |
|
|