Author Topic: Reason To Disable Triggers  (Read 2274 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Reason To Disable Triggers
« on: February 11, 2010, 10:45:23 PM »
I've always wondered why bother disabling triggers when you could just destroy them (or not create them in the first place).

Well, tonight I found the answer!  If you destroy a trigger that is used by a victory or defeat condition, the game crashes.  If you merely disable the trigger, the game proceeds as intended!
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Reason To Disable Triggers
« Reply #1 on: February 12, 2010, 12:51:19 AM »
And here we see bomber learning a lesson the hard way, lol

I'm sorry bomber, but I couldn't help but to laugh when I read that.
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Reason To Disable Triggers
« Reply #2 on: February 12, 2010, 06:13:15 AM »
What?  Why?
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Reason To Disable Triggers
« Reply #3 on: February 12, 2010, 09:16:43 AM »
personally, if I see something like that I assume that there has to be a good reason and start thinking about what it could be used for instead of just deleting it :P
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Reason To Disable Triggers
« Reply #4 on: February 12, 2010, 11:54:06 AM »
...Why would you want to create a trigger if you were never going to actually use it?

Besides, this is the only instance you would want to disable, not delete, the trigger.  You can only have so many triggers, and if you have too many OP2 crashes.  Destroying them is just good practice.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Reason To Disable Triggers
« Reply #5 on: February 12, 2010, 12:30:32 PM »
Is it a case where if you perfomr a certain action, the trigger is disabled?  Or is it just disabling a trigger that you put in there arbitrarily?
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Reason To Disable Triggers
« Reply #6 on: February 12, 2010, 12:50:50 PM »
In my current project, once a certain condition has been achieved (destroy all enemy units) then a failure condition (all player vehicles destroyed) is disabled.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials