CTF help trigger

assassin1221

New Member
Reaction score
0
Okay, well I am gonna try to do a trigger for when the flag is captured, but I can't think of a way to do this... please be in mind the unit has the item in a inventory slot anyone have a suggestion? Thanks

THere other triggers I need help with as well but I can't remember.

I also need some skins for a spy, a rifleman, and a trapper... If you know where I can find these thank you, I will give credit that is due as well!
 

tommerbob

Minecraft. :D
Reaction score
110
Okay, well I am gonna try to do a trigger for when the flag is captured, but I can't think of a way to do this... anyone have a suggestion?

Could you be more specific? Does the capturing unit carry the flag back to base? Or is it an automatic score?

I also need some skins for a spy, a rifleman, and a trapper... If you know where I can find these thank you, I will give credit that is due as well!

The Hive Workshop is probably your best resource for custom skins/models/icons.
 

assassin1221

New Member
Reaction score
0
Could you be more specific? Does the capturing unit carry the flag back to base? Or is it an automatic score?

When the unit picks up the flag and return it to there base with there flag there waiting.

The Hive Workshop is probably your best resource for custom skins/models/icons.

I have looked, but I can not find anything good enough.
 

tommerbob

Minecraft. :D
Reaction score
110
Why not just make the flag an item, and make the item fall on death.

Another option is the make the flag an item that is used on pickup, and that adds a buff to the unit. Then you can set your other triggers to detect if the unit has the flag buff.
 

tommerbob

Minecraft. :D
Reaction score
110
Create global variables for your teams. When a unit captures the flag and gets it back to his base, set the global variable to +1. When the global variable reaches a certain amount, end the game.
 

tommerbob

Minecraft. :D
Reaction score
110
Use a region for your base, a global variable array to track your score, another global variable to set your max score, and 2 unit groups for each team.

Trigger:
  • Events
    • Unit - A unit enters region X
    • Conditions
      • ((Triggering unit) has Buff FLAG) equal to true
    • Actions
      • If (Triggering unit) is in Unit Group 1, then do (actions)
        • Loop - Actions
          • Set TeamScore[1] = TeamScore[1] + 1
        • Else - Actions
          • Set TeamScore[2] = Teamscore[2] + 1
      • For each Integer A from 1 to 2, do actions
        • Loop - Actions
          • If TeamScore[Integer A] is greater than or equal to MaxScore, then do (actions)
            • Loop - Actions
              • Game - Victory


That was freehand, but you should get the idea.
 

assassin1221

New Member
Reaction score
0
wait wait.. Is this trigger only for one team or both if it for both then how would the other team get points
 

tommerbob

Minecraft. :D
Reaction score
110
Because of that Else function. That trigger simply tracks when any unit returns a flag to its base. It then checks which unit group it is in. If its in group 1, it rewards group 1. If its not in group 1, it rewards group 2.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top