• 🏆 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!

How do I trigger a Capture the Flag game type

Status
Not open for further replies.
Level 4
Joined
Apr 17, 2010
Messages
55
My most recent map Barren Wars has three game types. King of the Hill, Melee, and Capture the Flag.

The one problem is that I can only trigger the CTF game mode so far. I have made the variables (Captures) and the pick up and return triggers but I do not know how to make the trigger in which the game gives you a point when you move into the rect with the flag. It's the condition I'm stuck on. E.G Making the game give you a point if you have the flag.

What I have so far is posted as an attachment.

Can anyone help?
 

Attachments

  • Trigger.JPG
    Trigger.JPG
    17.2 KB · Views: 226
There are two ways to do that:

1) Via Hashtables:
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Hashtable - Create a hashtable
    • Set Hash = (Last created hashtable)
  • Trigger1
  • Events
    • Unit - A unit enters Rect 011 <gen>
  • Conditions
    • CaptureTheFlag Equal to True
  • Actions
    • Game - Display to (All players) the text: "((Name of (Owner of (Triggering unit)) + (has captured) + ((Name of Player 2 (Blue))+('s flag))
    • Hashtable - Save Handle Of Rect 011 <gen> as (Key flag) of (Key (Owner of (Triggering unit))) in Hash
2) Make a dummy flag in the region and set its custom value to the number of the player:
  • Unit - Set custom value of Dummy Flag <gen> to (Player number of (Owner of (Triggering unit)))
 
Level 4
Joined
Apr 17, 2010
Messages
55
I Can help you but then you must send me the map because i will create a good system for you with nice effects. Also, if you tell me more of the other modes i can also make them. And if you want to do something you'rself i would recomend you learn some more in triggering.

The Map is posted in the Map Development Forum under the name Barren Wars and it is not protected. Also, CTF, King of the Hill (finished) and Melee (finished) are the only modes in this version. If you can think of any others then tell me.

Remember to send the map back afterwords or post it back in the forum. And feel free to fix any leaks and add yourself to the credits.

Thanks.
+REP
 
Level 11
Joined
Jan 25, 2009
Messages
572
Sure i'll start working now my friend =)

EDIT: Hehe, i will reduce the usage of triggers with meaby more than 50% xD Depended on how many players there will be xD

EDIT2: Also i will reduce some lags with 20-30%. Because you're using to much of (Casting Unit) and such instead of (Triggering Unit). If you use triggering unit when the caster is triggering off the trigger, then if you want to have the casting unit as the unit hande, you should take triggering unit because then Wc3 doesn't need to search for the casting unit, it will just take the triggering unit, and if there are none, the function will return NULL. This is overclass for you but i can teach you some when i'm done =)

EDIT3: God damn it! The Worldeditor crashed but i love that WE saves the last tested map in a folder in wc3 map xD
 
Last edited:
Level 4
Joined
Apr 17, 2010
Messages
55
Thanks.

There are only going to be 2 players in this version. I also used WE unlimited which might make the original one crash sometimes, although I have never come across it before. As I have said before, Feel free to edit the triggers so they are as good as possible.
 
Status
Not open for further replies.
Top