![]() |
|
#1
|
|||
|
|||
|
Ive tried and tried but i cant get it right...
I have a trigger in the mission called "PlayerGetsClose" when blue army passes through it becomes active. Its suppossed to load a mission file called dovertrains.mis the path is missions\dogfights\DoverTrains\red There is a second trigger called "Sheernes" when blue army passes through it becomes active. Its suppossed to load a mission file called sheernes.mis. the path is missions\dogfights\DoverTrains\red Can anyone right this cs file for me? Ive tried to copy others and edited but i keep getting errors. Please help. Megahurt |
|
#2
|
|||
|
|||
|
Code:
using System;
using System.Collections;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;
public class Mission : AMission
{
public override void OnBattleStarted()
{
base.OnBattleStarted();
MissionNumberListener = -1;
}
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
if ("PlayerGetsClose".Equals(shortName))
{
GamePlay.gpPostMissionLoad(@"missions\dogfights\DoverTrains\red\dovertrains.mis");
GamePlay.gpGetTrigger(shortName).Enable = false;
}
if ("Sheernes".Equals(shortName))
{
GamePlay.gpPostMissionLoad(@"missions\dogfights\DoverTrains\red\sheernes.mis");
GamePlay.gpGetTrigger(shortName).Enable = false;
}
}
}
|
|
#3
|
|||
|
|||
|
Thanks Kodiak
Hopefully others wanting to do the same can copy this as a template for a simple script that can be easily edited to suit. Much appreciated. Megahurt |
|
#4
|
|||
|
|||
|
Oh they will get a complete tutorial about this in the near future
|
![]() |
|
|