![]() |
yes both work, the difference notwithstanding a little more complex with a void and switch, is it catches the half completed case for your outcome, and also you could add more triggers, like switch(column) for cases of 3, 4, 5, 6 and so on then do different things at different levels.
In this way you can also have other trigger results interact with main counter. Case selection can be more useful when you want it more flexible for different outcomes. A bool is true or false, so you really have only 2 states or maybe an elseif as a third. bool true and falses can end up in sequential if statements and you can trap yourself |
Awesome I understand, I am keen to put your code together and see how it works. Will try tonight :D thanks Smokeynz
|
Made some test with the TGroupDestroyed trigger
Found a additional problem with the TGroupDestroyed trigger, the trigger is only active before the group reached the endpoint. On the endpoint the trigger is automaticaly disabled. Seems to be a feature and not a bug, but i think its good to know. One of my test the 0_Chief had the shortest way (few meters), i don't destroy any target, only fly around. After the trigger is disabled automatically it no longer possible to activate the trigger. Server: Des_1 Trigger: True Server: Des_2 Trigger: True Server: Des_3 Trigger: True Server: -------------------------- Server: Des_1 Trigger: True Server: Des_2 Trigger: True Server: Des_3 Trigger: True Server: -------------------------- Server: Des_1 Trigger: True Server: Des_2 Trigger: True Server: Des_3 Trigger: True Server: -------------------------- Server: Des_1 Trigger: True Server: Des_2 Trigger: True Server: Des_3 Trigger: True Server: -------------------------- Server: Des_1 Trigger: False Server: Des_2 Trigger: True Server: Des_3 Trigger: True Server: -------------------------- Server: Die Schlacht ist beendet. My testscript and mission, the script shows the state of trigger every 10sec. : Code:
[PARTS] Code:
using System; |
Interesting, although not unexpected considering the detroyed trigger task is to activate on object destroyed, I mean how many times must it be kaput!
Probably a worth while exercise to look at all triggers in a similar way to see what "features" they have. For example, for the pass through trigger, from what I've seen it can be handled in a number of ways. if (shortName.Equals(shortName) && active) { //do somthing GamePlay.gpGetTrigger(shortName).Enable = false; } if you use only the following ,You can use the trigger in both true and false and it is always live. if (shortName.Equals(shortName)) { //do somthing } if you use only the following , it appears to only activate on true if (shortName.Equals(shortName) && active) { //do somthing } if you use only the following , it appears to only activate on true and disabled after use if (shortName.Equals(shortName) && active) { //do somthing GamePlay.gpGetTrigger(shortName).Enable = false; } So with that in mind, maybe leaving the following out of the destroy trigger it will stay live. GamePlay.gpGetTrigger(shortName).Enable = false; |
That is a very good point. I have completed the scripting and have it working for the moment, and is now uploaded on the ATAG test system (Destroy or defend the convoys).
But this find up here could tidy up the script a little or make for easier implementation. I think i have to read the above or draw some diagrams to get my head around it hehehe. Will run your test tonight |
All times are GMT. The time now is 05:12 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.