• 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.

Need aid in Vampirism base areas/regions whatever

Status
Not open for further replies.
Level 3
Joined
Mar 30, 2011
Messages
36
So.. I resumed creating my vampirism, and I need help in it.. I need improve to anti ally kill and these by adding some kind of regions that there you can kill your own & ally buildings. Normally you can't if that region isnt claimed or something. Need help & hope you got it.. :ogre_haosis:
 
  • Tr
  • Events
    • Unit - A unit is attacked
  • Conditions
    • ((Triggering unit) belongs to an ally of (Owner of (Attacking unit))) Equal to True
  • Actions
    • For each (Integer C) from 1 to RegionsCount, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • ((Triggering unit) is in Regions[C]) Equal to False
            • ((Attacking unit) is in Regions[C]) Equal to False
          • Then - Actions
            • Unit - Order (Attacking unit) to Stop
            • Skip Remaining Actions
          • Else - Actions
You also need a trigger that sets the Regions[] in the Map Initialization, e.g.
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Regions[1] = Region 000 <gen>
    • Set Regions[2] = Region 001 <gen>
    • Set Regions[3] = Region 002 <gen>
    • Set Regions[4] = Region 003 <gen>
    • Set Regions[5] = Region 004 <gen>
    • Set RegionsCount = 5 //the number of regions used.
 
Level 3
Joined
Mar 30, 2011
Messages
36
  • Tr
  • Events
    • Unit - A unit is attacked
  • Conditions
    • ((Triggering unit) belongs to an ally of (Owner of (Attacking unit))) Equal to True
  • Actions
    • For each (Integer C) from 1 to RegionsCount, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • ((Triggering unit) is in Regions[C]) Equal to False
            • ((Attacking unit) is in Regions[C]) Equal to False
          • Then - Actions
            • Unit - Order (Attacking unit) to Stop
            • Skip Remaining Actions
          • Else - Actions
You also need a trigger that sets the Regions[] in the Map Initialization, e.g.
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Regions[1] = Region 000 <gen>
    • Set Regions[2] = Region 001 <gen>
    • Set Regions[3] = Region 002 <gen>
    • Set Regions[4] = Region 003 <gen>
    • Set Regions[5] = Region 004 <gen>
    • Set RegionsCount = 5 //the number of regions used.
I made up regions.. some bases needed more regions.. now one Q= is that variable? (the region thing) I made up many regions.. for 28 bases.. I'm little confused :p but if it is possible, could you upload a map with those triggers for me?
 
Level 3
Joined
Mar 30, 2011
Messages
36
Yes, those are region variables. You will set the regions you want to check whether the units are in them or not, so as to either allow attacking action or not. Unless you have built a different system, give me a clear view of it to adjust the trigger. You said you can claim regions. How do you do this? By using a hashtable?

By building a structure :D ^^ or typin txt like -claim.. don't know how to
 
Level 9
Joined
Apr 7, 2010
Messages
480
yea, i've played vampirism before. if the player build a flag it denies the other player from building there or in other term claiming the spot. in my opinion its better to allow the player to be able to kill its allies only on his/her spot.
 
Status
Not open for further replies.
Top