• 🏆 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] Problems with RPG triggers

Status
Not open for further replies.
Level 1
Joined
Nov 24, 2011
Messages
4
I've run into some trouble with my triggers. Im making a basic shitty rpg map and i want to have multiple classes able to wear the same type of armor. In this cases a Wizard and a Flame Seeker.
But when i set the unit type of triggering unit to both of them, then none of them can wear the armor. When i just have either the Wizard or the Flame Seeker in the trigger it works fine, but when both of them comes into play it doesnt work.
I've tried to just copy paste the trigger and have the first trigger to be with Wizard and the second trigger to be with Flame Seeker but that doesnt work either.

Also im too dumb to figure how to format triggers when making threads.

This is the main system: Imgur: The most awesome images on the Internet

And this is the trigger specifically for light amor: Imgur: The most awesome images on the Internet
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
The "IF" block in the "If/Then/Else" is an "AND" block by default - in other words a logical conjunction. "AND" means all conditions have to pass (be true) for the result of an AND block to be true.
In your case the condition works if there is only 1 hero-type (e.g. wizard), because then when you go through the condition, it is true that the triggering unit-type is Wizard.
However it does not work when there are 2 hero-types, because when unit picks the item, that unit's unit-type has to be Wizard AND Flame Seeker. Since each unit can have only one unit-type, this condition always returns FALSE and so the AND block fails and sends you to the "ELSE" block.

The way to solve this is to use an "OR" block. When picking conditions just search for "OR (multiple actions)" or something like that (I usually just tap "O" button multiple times to get it). Use it the same way you use it for the items (Robes of Harmony, Light Armor) in the same trigger.
 
Status
Not open for further replies.
Top