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

[Trigger] Trigger help >.>

Status
Not open for further replies.
Level 10
Joined
Apr 13, 2005
Messages
630
Well i have been working on this trigger for over 1 month and its been causing me alot of trouble. Wut i want to be able to do is a player attacks a citizen and the gaurds will coem and the citizen aid by attacking the player. This part of the trigger is done but the next part is tripping me up. You see after the player died i want the guards to reallie. I have been told its my varible i set it to. But i keep trying to change it with no effect.

Here is the first part of the trigger​

  • Guard Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Attacked unit)) Equal to Child
          • (Unit-type of (Attacked unit)) Equal to Citizen (Female)
          • (Unit-type of (Attacked unit)) Equal to Citizen (Male 2)
      • ((Owner of (Attacking unit)) controller) Equal to User
    • Actions
      • Set killerpeasent = (Owner of (Attacking unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Attacking unit)) controller) Equal to User
        • Then - Actions
          • Player - Make Player 12 (Brown) treat killerpeasent as an Enemy
          • Player - Make killerpeasent treat Player 12 (Brown) as an Enemy
          • Game - Display to (All players) the text: ((Name of (Triggering player)) + Has attack a citizen and is now put the gaurds on alert. they will attack you if you go near them)
          • Trigger - Run run died check <gen> (checking conditions)
        • Else - Actions

Here the trigger i screw up on​

  • run died check
    • Events
      • Unit - A unit Dies
    • Conditions
      • killerpeasent Equal to (Owner of (Dying unit))
    • Actions
      • Player - For killerpeasent, turn Alliance (non-aggression) On toward Player 12 (Brown)
      • Player - For Player 12 (Brown), turn Alliance (non-aggression) On toward killerpeasent
 
Last edited by a moderator:
Level 2
Joined
Jun 15, 2008
Messages
18
You don't need the "run killer died check" in the first trigger - it is redundant. Is that what is ruining it?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
  • Guard Attack
  • Events
  • Unit - A unit Is attacked
  • Conditions
  • Or - Any (Conditions) are true
  • Conditions
  • (Unit-type of (Attacked unit)) Equal to Child
  • (Unit-type of (Attacked unit)) Equal to Citizen (Female)
  • (Unit-type of (Attacked unit)) Equal to Citizen (Male 2)
  • ((Owner of (Attacking unit)) controller) Equal to User
  • Actions
  • Set killerpeasent = (Owner of (Attacking unit))
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Owner of (Attacking unit)) controller) Equal to User
    • Then - Actions
      • Player - Make Player 12 (Brown) treat killerpeasent as an Enemy
      • Player - Make killerpeasent treat Player 12 (Brown) as an Enemy
      • Game - Display to (All players) the text: ((Name of killerpeasent) + Has attack a citizen and is now put the gaurds on alert. they will attack you if you go near them)
      • Trigger - Add to (run died check) the event (Unit - A unit owned by killerpeasent Dies)
      • Else - Actions
  • Events
  • Unit - A unit Dies
  • Conditions
  • Actions
  • Player - (For Player owner of(Triggering unit)), turn Alliance (non-aggression) On toward Player 12 (Brown)
  • Player - For Player 12 (Brown), turn Alliance (non-aggression) On toward Player owner of Triggering unit
Note that it leaks.
 
Status
Not open for further replies.
Top