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

[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