HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger decisions based on attributes

03-13-2009, 02:36 PM#1
Fladian
There's something I have been wondering about and I am hoping to get an answer here. :)

Through triggers you can easily change something based on the attributes. For example, when a hero has 15 strength and kills something, he gains a new ability. When he has 16 strength, he gains another ability instead.

However, is it possible to create a trigger that does something like this?
When a hero has 15 strength or more (or greater), he gains <ability>. When he has 14 strength or less, he gains <other ability>.
I can find a few of these triggers, but they are all related to health or mana, not to attributes... so, are they even there?

Thanks in advance.
Fladian
03-13-2009, 02:52 PM#2
Captain Griffen
Gains a level, picks up item, uses item, learns a skill...unless you otherwise by triggers edit stats, then there shouldn't be any other impacts on it. Then just check the stats each time.
03-13-2009, 03:00 PM#3
Fladian
Hmm, but in this case I am not exactly using an ability, I am changing dialogs in cinematic scenes.

Could it still work the same way with changing cinematic scenes then?
03-13-2009, 03:21 PM#4
Captain Griffen
Cinematic scenes are even easier, just use a condition for their stats.
03-13-2009, 03:42 PM#5
Fladian
So I have to make an integer comparison condition for every single possible amount of strength/intelligence/agility attribute the hero can get?

Sorry, it's been some years since I used the editor. I'll be needing a very clear explanation in this.
03-13-2009, 03:57 PM#6
Captain Griffen
Or you could use more than/less than? What are you trying to do?
03-13-2009, 04:35 PM#7
Fladian
That's actually what I can't find. Or at least, I can find that trigger, but I can't find how I can make it relate to attributes... I can find it when it is related to just about everything else.
03-13-2009, 06:40 PM#8
Captain Griffen
If/Then/Else where the if is an integer comparison.
03-13-2009, 06:47 PM#9
Fladian
So I'll have to make an If/Then/Else condition (in the action) for every possible attribute he can get?

Meaning that I'll have to make one an if/then/else for 21 strength, 22 strength, 23 strength, 24 strength, 25 strength, and on and on...

I was hoping to avoid that actually, which is the reason I posted here.

To make it completely clear what I am trying to do: Some characters in the game respond to a specific attribute of a hero. So if he has 20 strength, the character despise the hero because he is too weak and shows this in the dialog (which could result in a fight, for example). However, when the strength is 21 or higher, he respects you because you're strong and avoid the fight. However, it is easily possible in my game to get over 21 strength and reach 48, for example. To create 27 conditions every time will be getting annoying for me.
To say it in a simple way of course.
03-13-2009, 08:30 PM#10
Captain Griffen
If strength is less than or equal to 21 then despise, else respects.
03-13-2009, 09:31 PM#11
Fladian
Ah yes, now I see it. Thanks. I can't believe how I missed something that simple.
Trigger decisions based on attributes - Wc3C.net