![]() |
[WIP] MissionTools dll
I'm working on a .dll which should help all the FMB users out-there. This should shorten the mission's code, and keep the mission structure clearer, helping non C sharp mission designers do what they are doing the best :)
Here's the atm structure of the class Code:
public class MissionTools { |
looks nice :grin: , have you found a way to import/access this dll from mission script. i had trouble adding a namespace.
|
there are two ways to do it atm:
1) this is the new one (haven't tested it yet) Code:
//$reference parts/MissionTools/MissionTools.dll Code:
using nsMissionTools; Then I intend to release it for everyone, and use it to create a Dynamic Campaign Generator. BTW, do you know any method to reference an AiActor from an AiAircraft (a simple one, not searching through all AiActors to find the one being that specific AiAircraft)? You can d it the other way around using (AiAircraft) AiActor or AiActor as AiAircraft, but how can I reverse this? I've asked naryv, but he hasn't responded yet.. |
Thanks, this would be useful.
Quote:
Code:
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex) |
hmm.. I didn't thought it might work both ways.. I'll need to do some testing then, thank you :)
|
You can always cast from AiAircraft to AiActor but you can not always cast from AiActor to AiAircraft.
You can check if its possible to cast from AiActor to AiAircraft by this: Code:
AiActor actor; Code:
AiAircraft aircraft = actor as AiAircraft; |
the problem was not with casting AiActor to AiAircraft, but viceversa.
|
I'm assuming there will be documentation? ;)
I'm assuming you're using Visual Studio? Unfortunately, Visual Studio doesn't include a nice html documentation generator. If you're not aware, there are several third party documentation generators. My favorite is Doxygen. It uses Visual Studio's xml files to produce html files that are fairly easy to navigate, but most importantly, it's very easy to use. |
Of course there will be, I'll have to learn to use that Doxygen though :)
|
Requesting...
public bool AircraftCrashlanded(Aircraft aircraft) public bool AircraftCrashlandedAtFriendlyField(Aircraft aircraft) |
All times are GMT. The time now is 12:32 AM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.