![]() |
#9
|
|||
|
|||
![]()
I thought about this a bit more, I think you can solve this by creating a separate void
The trick is keep the 2 triggers separate, but instead of calling the action or text from the trigger call a void You need a bool or interger count in the trigger to act as a reference that the condition has been met then call the void within the void have conditional if statement or switch, in the case of each bool or interger count being this state or value then call the result if it hasnt had both triggers call yet nothing happens, or you could call a text message "half the column destroyed" . the following might work, it is something I use for other things, but no real reason this wont work here for this. code itself may require tweaking a little, but you get the idea Code:
private int column; public override void OnTrigger(int missionNumber, string shortName, bool active) { base.OnTrigger(missionNumber, shortName, active); if ("Target1".Equals(shortName) && active) { column = column + 1; callcolumn(); GamePlay.gpGetTrigger(shortName).Enable = false; } if ("Target1_1".Equals(shortName) && active) { column = column + 1; callcolumn(); GamePlay.gpGetTrigger(shortName).Enable = false; } } private void callcolumn() { switch (column) { case 1 GamePlay.gpHUDLogCenter(" Half the Column destroyed!!!"); break; case 2 column = 0; GamePlay.gpHUDLogCenter("Column destroyed!!!"); break; } } Last edited by Smokeynz; 03-15-2012 at 06:12 AM. |
|
|