• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Ability Check Problems

Status
Not open for further replies.
Level 10
Joined
May 20, 2008
Messages
433
I have yet another error with the triggering in my map. The basic idea of the trigger is if unit X casts a certain ability, then another trigger will activate. When the unit casts another specific ability, the game will complete a quests and so on...
The error occurs when checking what ability is cast. Whatever ability is cast, it terminates the connection. I have checked the abilities on the unit and in the trigger, and have rechecked my triggers, though the problem still remains.
Firing Trigger
  • OpSys Core
    • Events
      • Unit - A unit enters OpSysReg <gen>
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
          • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
          • (Owner of (Triggering unit)) Equal to Player 4 (Purple)
    • Actions
      • Trigger - Turn off (This trigger)
      • Set Opsys_Operator_Unit = (Triggering unit)
      • Player Group - Add (Owner of (Triggering unit)) to Opsys_Operator
      • Unit - Move Opsys_Operator_Unit instantly to Quest_Ping
      • Unit - Pause Opsys_Operator_Unit
      • Set OpSys_Core = Operation System Core 0037 <gen>
      • Unit - Change ownership of OpSys_Core to (Owner of (Triggering unit)) and Retain color
      • Game - Display to Opsys_Operator for 15.00 seconds the text: |cffFF8000AI|r: Con...
      • Trigger - Turn on OpSys 1 <gen>
      • Trigger - Turn on OpSys Exit <gen>
      • Trigger - Turn on OpSys Error <gen>
Ability Exit (run through an ability)
  • OpSys Exit
    • Events
      • Unit - Operation System Core 0037 <gen> Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Exit (real)
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off OpSys Error <gen>
      • Set OpSys_Exit = (Center of OpSys Exit <gen>)
      • Unit - Move Opsys_Operator_Unit instantly to OpSys_Exit
      • Unit - Unpause Opsys_Operator_Unit
      • Unit - Change ownership of OpSys_Core to Player 6 (Orange) and Retain color
      • Game - Display to Opsys_Operator for 15.00 seconds the text: |cffFF8000AI|r: Con...
      • Player Group - Remove (Owner of Opsys_Operator_Unit) from Opsys_Operator
      • Trigger - Turn on OpSys Core <gen>
Error Sequence (run when an error in the sequence occurs)
  • OpSys Error
    • Events
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Set OpSys_Exit = (Center of OpSys Exit <gen>)
      • Unit - Move Opsys_Operator_Unit instantly to OpSys_Exit
      • Unit - Unpause Opsys_Operator_Unit
      • Unit - Change ownership of OpSys_Core to Player 6 (Orange) and Retain color
      • Game - Display to Opsys_Operator for 5.00 seconds the text: |cffFF8000AI|r: Cri...
      • Player Group - Remove (Owner of Opsys_Operator_Unit) from Opsys_Operator
      • Trigger - Turn on OpSys Core <gen>

Operation Triggers (1-3)
  • OpSys 1
    • Events
      • Unit - Operation System Core 0037 <gen> Begins casting an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Security System (real)
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Game - Display to Opsys_Operator for 2.00 seconds the text: *CLICK*
          • Trigger - Turn on OpSys 2 <gen>
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Not equal to Exit (real)
              • (Ability being cast) Not equal to Security System (real)
            • Then - Actions
              • Trigger - Run OpSys Error <gen> (ignoring conditions)
            • Else - Actions
  • OpSys 2
    • Events
      • Unit - Operation System Core 0037 <gen> Begins casting an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Looping Files (real)
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Game - Display to Opsys_Operator for 2.00 seconds the text: *CLICK*
          • Trigger - Turn on OpSys 3 <gen>
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Not equal to Exit (real)
              • (Ability being cast) Not equal to Looping Files (real)
            • Then - Actions
              • Trigger - Run OpSys Error <gen> (ignoring conditions)
            • Else - Actions
  • OpSys 3
    • Events
      • Unit - Operation System Core 0037 <gen> Begins casting an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Data System (real)
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Game - Display to Opsys_Operator for 2.00 seconds the text: *CLICK*
          • Trigger - Turn on OpSys 4 <gen>
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Not equal to Exit (real)
              • (Ability being cast) Not equal to Data System (real)
            • Then - Actions
              • Trigger - Run OpSys Error <gen> (ignoring conditions)
            • Else - Actions
Concluding Trigger (The End)
  • OpSys 4
    • Events
      • Unit - Operation System Core 0037 <gen> Begins casting an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to System Control (real)
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Game - Display to Opsys_Operator for 2.00 seconds the text: *CLICK*
          • Game - Display to (All players) for 5.00 seconds the text: |cffFF8000AI|r: The...
          • Unit - Move Opsys_Operator_Unit instantly to OpSys_Exit
          • Unit - Unpause Opsys_Operator_Unit
          • Unit - Change ownership of OpSys_Core to Player 6 (Orange) and Retain color
          • Player Group - Remove (Owner of Opsys_Operator_Unit) from Opsys_Operator
          • Quest - Mark Current_Quest as Completed
          • Trigger - Run FixSetup <gen> (checking conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Not equal to Exit (real)
              • (Ability being cast) Not equal to System Control (real)
            • Then - Actions
              • Trigger - Run OpSys Error <gen> (ignoring conditions)
            • Else - Actions
So far the trigger hasn't even passed the first check, and always ends in running the error trigger. All other parts of the trigger function as intended (those leading up to Opsys1, where I cannot test past).
This has been holding back my project for awhile now. Help will be rewarded.
 
Level 10
Joined
May 20, 2008
Messages
433
@Cokemonkey: I turn it off right at the start so that it can't be run a second time while its being run.
@Pharaoh: Thats one of the main points of the system, it doesn't run right through. The player picks 1 of 4 abilities that activate the trigger (for good or bad), not having triggers running other triggers.
 
Level 10
Joined
May 20, 2008
Messages
433
Well the triggers that have the problem (OpSys 1+) do have events (unit casts ability). So all that's needed to be done is turn them on, and they do react (tested to be true). The ones without events are ran through other triggers.
 
@Cokemonkey: I turn it off right at the start so that it can't be run a second time while its being run.
@Pharaoh: Thats one of the main points of the system, it doesn't run right through. The player picks 1 of 4 abilities that activate the trigger (for good or bad), not having triggers running other triggers.

Warcraft 3 is single threaded. There are no waits in your trigger so it WON'T run again. Even if the "turn off" is at the bottom.

And by the way pharaoh is right, I didn't catch that your off triggers don't have events.
 
Level 10
Joined
May 20, 2008
Messages
433
Warcraft 3 is single threaded. There are no waits in your trigger so it WON'T run again. Even if the "turn off" is at the bottom.

And by the way pharaoh is right, I didn't catch that your off triggers don't have events.

The problem has nothing to do with events. Every trigger runs when asked, its just the core triggers (OpSys 1,2,3,4) that have internal problems.

*BUMP*
 
Level 13
Joined
May 11, 2008
Messages
1,198
the names of your abilities are really weird

after quoting and pasting the text to get it out of those annoying trigger boxes...

first, a point of advice. debug your triggers better. for one thing, why not copy this line:
Unit - Change ownership of OpSys_Core to (Owner of (Triggering unit)) and Retain color
make a line that says something like:
Unit - Change ownership of OpSys_Core to (Owner of (Triggering unit)) and Change color

and disable the retain color line while you're debugging? that way, you can make sure the ownership is being changed. also, i think you should use player variables for changing ownership, maybe. anyway, i don't think you need to use player group variables for changing ownership.

one more thing, use BJDebugMsg() for debugging, please. i'm not sure, but i think the equivalent of that in gui is something like, display msg to all players action.

edit: i guess you were using playergoup variable for text msg display? eh, i used to do that too, but i advise against it.
 
Last edited:
Level 10
Joined
May 20, 2008
Messages
433
hmm...is it that the abilities casted are supposed to be some sort of code? like, unless you cast ability 1, 2, 3, 4 in that order the mission is not completed? i don't understand what you were trying to do.

Yes, that is what I'm trying to do. Cast the abilities (in the game, your shutting down systems) in the certain order to complete the mission, otherwise you are 'kicked' from the machine. Its a puzzle.
Also, in response to your other post: for aesthetics, the colour is retained during the change owner stuff. Also, the ability names work perfectly when you know what they are relating to, otherwise, yes they are odd. And I don't understand about the debugging things.

Bribe: I'll see what I can do, but the entire thing has a 1/4 chance of appearing each game (I'll see about modifying it and all that). However, its really important that this works. At the very skeleton of the trigger, all its doing is checking the ability being cast, but its always coming out to not that ability (I've checked to make sure its the same trigger as the unit has).
 
Level 13
Joined
May 11, 2008
Messages
1,198
what i meant was...you're not getting the message and i thought it might be because of a mistake with who you're sending the message to. so to make sure the trigger is running since most of what they do is send a message, send a message to all players just to confirm that the trigger is running. you think it's not running, but what if it is and the message isn't sent because your players in the player group aren't in the player group variable? i don't really use player group variables so i don't know if you're using them right. but that's not how i send messages... so that's why i suggested you confirm your triggers are running. the best way to confirm a trigger is running is to send a message to all players with a string like, this trigger is running or whatever.

anyway, since you said it is a coded sequence, i might have something of a solution for you somewhere...although it's all jass pretty much...i'll examine it, it was in a very complex hero design...i think what you're trying to do should be child's play by comparison, but anyway i didn't design that hero, the invoker. but i did myself attempt my own version at one point and then abandoned the attempt when i discovered that someone recreated about 90 percent of the invoker already.
 
Level 10
Joined
May 20, 2008
Messages
433
*BUMP*

I have an edited version of the map. Do note the game is in a pre-alpha state, and modified to allow for easy access to this problem. Also, as an advisory note: THE GAME IS NOT 4 PLAYERS YET (any other players will have nothing). Don't attempt multiplayer.
Notes: There are some helpful notes in the triggers section (under the "Notes" comment). Also, the attached image shows the location of the object relating to the trigger (AKA, in the game, get there to find the problem, and yes, you will have to open doors and half-play the game).
Although the thread is for the problem, any comments for the map are welcomed (as long as you don't go off topic and post something on he trigger issue, AKA no questions)
 

Attachments

  • Station H13(EDIT).w3x
    423 KB · Views: 43
  • OpSys Location.png
    OpSys Location.png
    371.7 KB · Views: 49
Landmine, I can see some big flaw in your FixSetup trigger. You have the event "Map Initialization" and you have in the same trigger a condition "Fix_Ship" Equal to True. This is completely false. Map Initialization is an event before any other event can fire, so, you can't set Fix_Ship to True, unless it is in this very trigger. To avoid that, go to the variable "Fix_Ship" and set Initial Value to True, or simply remove that condition and assume that the condition is true.
 
Status
Not open for further replies.
Top