Vamp game triggers

world23wc3

Member
Reaction score
6
Hi, I made this trigger
Trigger:
  • Player 1 vampire minion
    • Events
      • Unit - Builder 0012 <gen> Dies
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
          • Player - Make Player 1 (Red) treat Player 2 (Blue) as an Enemy
          • Player - Make Player 11 (Dark Green) treat Player 1 (Red) as an Ally with shared vision
          • Player - Make Player 12 (Brown) treat Player 1 (Red) as an Ally with shared vision
          • Player - Make Player 1 (Red) treat Player 11 (Dark Green) as an Ally with shared vision
          • Player - Make Player 1 (Red) treat Player 12 (Brown) as an Ally with shared vision
          • Player - Make Player 1 (Red) treat Player 3 (Teal) as an Enemy
          • Player - Make Player 1 (Red) treat Player 4 (Purple) as an Enemy
          • Player - Make Player 1 (Red) treat Player 5 (Yellow) as an Enemy
          • Player - Make Player 1 (Red) treat Player 6 (Orange) as an Enemy
          • Player - Make Player 1 (Red) treat Player 7 (Green) as an Enemy
          • Player - Make Player 1 (Red) treat Player 8 (Pink) as an Enemy
          • Player - Make Player 1 (Red) treat Player 9 (Gray) as an Enemy
          • Player - Make Player 1 (Red) treat Player 10 (Light Blue) as an Enemy
          • Player - Make Player 2 (Blue) treat Player 1 (Red) as an Enemy
          • Player - Make Player 3 (Teal) treat Player 1 (Red) as an Enemy
          • Player - Make Player 4 (Purple) treat Player 1 (Red) as an Enemy
          • Player - Make Player 5 (Yellow) treat Player 1 (Red) as an Enemy
          • Player - Make Player 6 (Orange) treat Player 1 (Red) as an Enemy
          • Player - Make Player 7 (Green) treat Player 1 (Red) as an Enemy
          • Player - Make Player 8 (Pink) treat Player 1 (Red) as an Enemy
          • Player - Make Player 9 (Gray) treat Player 1 (Red) as an Enemy
          • Player - Make Player 10 (Light Blue) treat Player 1 (Red) as an Enemy
          • Trigger - Turn off (This trigger)
      • Unit - Create 1 Vampire minion for Player 1 (Red) at (Center of Vampire minions spawn here <gen>) facing Default building facing degrees


It makes player 1 become an vampire and treat his old allies. But now i found out that if player 2 as an example already is a vamp then player 1 is going to treat player 2 as an enemy if he becomes a vamp also. I don't know how to fix this, so please help me with an working soloution. One soloution migth be to make the player that dies to join the vampire team. But i don't know how to do that :(
 
Try this:
Make Neutral treat every player as ally except the vamp.
When he dies(gets vampire) remove him from allies of Neutral
When some one dies , pick every ally of Neutral and make them be treat'd as enemyes.
 
I'm assuming that the players become "vamped" if their main unit dies. If this is the case, then all you have to do is make a trigger that registers when that main unit dies. Say the unit is owned by player 2 blue, and for now i'm just going to call him a peon.

Trigger Name: Player 2 Vamped

Events: a unit dies.

Conditions: unit-type is equal to peon;
owner of dying unit is equal to player 2 Blue

Actions: create 1 vampire minion for player 2 blue at center of vampire minions spawn here;
Make Player 1 Red treat Player 2 Blue as an ally with shared vision;
Make Player 2 Blue treat Player 1 Red as an ally with shared vision;
Player Group - Select all players matching player is an enemy of player 1 Red equal to true and do:
-Make Picked Player treat Player 2 Blue as an enemy
-Make Player 2 Blue treat Picked Player as an enemy
Player Group - Select all players matching player is an ally of player 1 Red equal to true and do:
-Make Picked Player treat Player 2 Blue as an ally with shared vision
-Make Player 2 Blue treat Picked Player as an ally with shared vision



Then you copy this trigger for each player. There are easier ways to make this work, but this trigger works without the use of variables.
 
Assuming the vampires dont change sides you can just base the groups off one of them (also assuming 11 (dark green) is one the main vampires, if not switch it to whoever is for sure a vampire)

Trigger:
  • Minion
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Peasant
    • Actions
      • Set Vamp_PlayerGroup = (All allies of Player 11 (Dark Green))
      • Set Human_PlayerGroup = (All players matching ((((Matching player) is an enemy of Player 11 (Dark Green)) Equal to True) and ((Matching player) Not equal to (Owner of (Triggering unit)))))
      • Player Group - Pick every player in Human_PlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Make (Picked player) treat (Owner of (Triggering unit)) as an Enemy
          • Player - Make (Owner of (Triggering unit)) treat (Picked player) as an Enemy
      • Player Group - Pick every player in Vamp_PlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Make (Picked player) treat (Owner of (Triggering unit)) as an Ally with shared vision
          • Player - Make (Owner of (Triggering unit)) treat (Picked player) as an Ally with shared vision


Hope this helps :thup:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top