• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

CTF problem

Status
Not open for further replies.
Level 5
Joined
Jul 4, 2008
Messages
111
Hello im trying to figure out a problem. Its when a allied player tries to take the flag so my trigger looks like this

EVENT
-A unit enters Region Forest Keepers Flag <Gen>
CONDITIONS
-Or - any conditions are true
CONDITIONS ARE -
-Owner of triggering unit Equal to Player 1
-Owner of triggering unit Equal to Player 2
-Owner of triggering unit Equal to Player 3
-Owner of triggering unit Equal to Player 4
-Owner of triggering unit Equal to Player 5
ACTIONS
Unit move unit instantly to Centre of KEEP AWAY
--------------------------------------------------------------------------
Help please:cry::cry::cry::cry::cry:
 
Level 5
Joined
Jul 4, 2008
Messages
111
sorry. well i tried using it but it doesn't work so if anyone could help me make a new workable trigger like this one or maybe help me fix this one, im not sure wats wrong with it but i think its something to do with the conditions.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
With the correct way, I think onix_noob means you should Copy As Text and paste here in a '[ trigger ] [ /trigger ]' tag.

What exactly does the trigger do now? Does it do absolutely nothing, or is it still acting, but doing something different then it should? If somethings different, tell us what exactly it is doing.
 
Level 3
Joined
Jan 30, 2005
Messages
38
Okie Dokie... I've done a few CTF maps before.. And the hardest/complex/most annoying part of it, is just making sure allies cant pick your flag up (unless away from home [where its supposed to be]) and everything else like that...

What I would suggest is basing the trigger off the flag item.. If you've based it all off regions then the game won't flow naturally like a CTF.

So to do with your problem, I've chucked together this trigger here (hope it helps)

  • Ally Pickup
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Human Flag
      • ((Owner of (Hero manipulating item)) is in Team_Humans) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HumanFlagOutOfBase Equal to 1
        • Then - Actions
          • Game - Display to (All players) for 2.00 seconds the text: Congrats! You returned your flag!
          • Set HumanFlagOutOfBase = 0
        • Else - Actions
          • Game - Display to (All players) for 2.00 seconds the text: Cannot pick up your own flag
And then: (This sets up when an enemy picks it up)
  • Enemy Pickup
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Human Flag
      • ((Owner of (Hero manipulating item)) is in Team_Orcs) Equal to True
    • Actions
      • Set HumanFlagOutOfBase = 1
      • Set HumanFlagBearer = (Hero manipulating item)
      • Game - Display to (All players) for 2.00 seconds the text: Your flag has been been stolen!
Then: (When Unit dies)
  • OnDeath
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to HumanFlagBearer
    • Actions
      • Set HumanFlagBearer = No unit
      • Game - Display to (All players) for 2.00 seconds the text: Human Flag has been dropped
Obviously dont display the text to everyone though...
If you need help triggering the rest of it, let me know.. You can simplify it quite easily :)

Hope this makes sense too.. Don't complain if there minor bugs, typed it up quickly, its just a rough idea... I'm so very tired...
 
Status
Not open for further replies.
Top