- 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)
-
Conditions
- ((Owner of (Attacking unit)) controller) Equal to User
-
Or - Any (Conditions) are true
-
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
-
If - Conditions
-
Events
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
-
Events
Last edited by a moderator: