HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Item-Class Trigger...

08-13-2005, 10:44 PM#1
Ignitedstar
I wondering how you could make it so that you can only have one item of each type, such as 1 sword, 1 armor, etc. Can anyone help?

I do not want to make it so that a hero of TYPE, which means that only a certain primary atrribute hero can equip certain items.
08-14-2005, 12:54 AM#2
drdlord
add a trigger:

event:
-unit picks up an item
condition:
-or multiple
-unit has item of type flaming sword
-unit has item of type ice sword
-or multiple
-item being picked up is flaming sword
-item being picked up is ice sword
actions:
-drop item being picked up
08-14-2005, 01:02 AM#3
Ignitedstar
Do you mind to explain what multiple means?

So, when a hero picks up an item, the condition will check if the hero already has a "weapon", and if it does, it will automattically drop the picked up item?
08-14-2005, 01:18 AM#4
Tim.
Easy,

Quote:
Item-Type Check
Events
Unit - A unit Acquires an item
Conditions
Actions

//This is where you check for Swords

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to Assassin's Blade
<LIST ALL ITEMS OF TYPE SWORD>
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Hero manipulating item) has an item of type Assassin's Blade) Equal to True
<LIST ALL ITEMS OF TYPE SWORD>
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Else - Actions
Else - Actions

//This is where you check for Shields

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to Assassin's Shield
<LIST ALL ITEMS OF TYPE SHIELD>
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Hero manipulating item) has an item of type Assassin's Shield) Equal to True
<LIST ALL ITEMS OF TYPE SHIELD>
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Else - Actions
Else - Actions
08-14-2005, 02:00 AM#5
Ignitedstar
Thanks a lot, Tim. This help a lot. :)
08-14-2005, 02:16 AM#6
drdlord
Tim's code is basicly the same as mine, I used conditions he used if the "-or multiple" line meant use the contiion "Or, Multiple Conditions" that's what the editor calls it. I ment have all the indented stuff under the one or condition so if any of the conditions are true it fires not if all of them like normal