#1
|
|||
|
|||
Any Other Cool Features?
Hey all,
Been making a test mission for MP, and trying to add any thing that is cool to it. So far I have the ambulance and airfield vehicles script. I want Trains but they dont work sadly. Does anyone else know of any other cool features i could add to my mission? Also how do i add multiple scripts? I have the above script running but i also want to add the remove non ai aircraft when player leaves script from below: Quote:
The Gerbil Last edited by Gerbil Maximus; 09-27-2011 at 09:28 AM. |
#2
|
|||
|
|||
Usually you can just add it inside brackets of the existing script
public class Mission : AMission { // all scripts here } But keep in mind that you can have only one instance of each method. E.g. if you already have the method OnPlaceLeave used in the old script you should add OnPlaceLeave part of the new script into this method of the old script. Search the forum for missions by stillborn, hc_wolf, adonys, theenlightenedflorist, snafu, Kodiak and others for more ideas of cool scripts. Last edited by Ataros; 09-27-2011 at 12:35 PM. |
#3
|
|||
|
|||
uhm.. not really.. I haven't really tried it, but I think you can use the cascaded inheritances of the same method.
Code:
public override void OnBattleStarted() { base.OnBattleStarted(); ... } |
#4
|
|||
|
|||
Quote:
I had a script error when I tried to copy a second instance of some method (onTrigger or onActorCreated) to the same script placing it below the 1st one. |
#5
|
|||
|
|||
inheritance should only work in different scripts.
base MG script Code:
public override void OnBattleStarted() { code1 } Code:
public override void OnBattleStarted() { base.OnBattleStarted(); code2 } Code:
public override void OnBattleStarted() { base.OnBattleStarted(); code3 } |
|
|