• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Items

Status
Not open for further replies.
Level 2
Joined
Sep 18, 2004
Messages
14
is there a simple way to do that:

paladin can carry only 1 Melee weapon 1 shield

ranger can carry only 1 ranged weapon

dragon hunter can carry 2 melee weapons

[/code][/code]
 
Level 3
Joined
Sep 6, 2004
Messages
40
Heres a code to do it, not sure if theres an easier way, but it works

Event
Unit - A unit Acquires an item
Condition
(Unit-type of (Hero manipulating item)) equal to (ranger)
(Item-type of (Item being manipulated)) Equal to (your bow here as an item)
Actions
Set LootCheck(this being a variable, integer with 0(default)=0)
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
If ((Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to !!Your bow here!!) then (Set LootCheck = (LootCheck + 1)) else do (Do nothing)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
LootCheck Greater than 1
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Game - Display to (Player group((Owner of (Hero manipulating item)))) for 3.00 seconds the text: You can't carry two bows.(or what ever text here)
Else - Actions
Do nothing
Set LootCheck = 0


There ya go, that should work, if not sorry bout it.

In the red is where you must add all your bows... so if you have 50 youd hafta put all of them except the bow thats being picked up. So im not sure if theres an easy way if there is PLEASE post it
 
Level 2
Joined
Sep 18, 2004
Messages
14
Not working :cry: i need a good trigger that will work and it will work on item type means that instead of listing all melee/ranged/magic weapons in the trigger i want to make them as a group and thatn put this in a trigger that will let you carry only 1
plz anyone help...

but tnx to this trigger u posted i improved my trigger/verible skills so tnx :lol:
 
Level 6
Joined
Mar 25, 2004
Messages
235
Make item classes for weapon, shield, helmet etc (chenge the old ones), then check if the unit has an item of the aquired item's class, do like above, except that you're using item-classes. Note that this is best if you have lots of items and not using the item-classes for something else.
 
Level 2
Joined
Sep 18, 2004
Messages
14
first of all his trigger doest work i did exacly like he said and when i take 1 item it drops it i dont know why i tryed to fix it and it didnt drop items at all

òàê øòî âîâøå ïèçäåö... :cry:

second u have a point there but as u can c im a noob can u plz tell me how its done...
like that guy did in his trigger
 
Level 2
Joined
Sep 18, 2004
Messages
14
THATS THE WAY ITS DONE... :p

2 triggers:

1)Event:
unit Aquires item

Condition:
item CLASS of item beeing manipulated=PERNAMENT

Action:
if item class of item beeing manipulated equal to PERNAMENT then set LootCheck+1 else do nothin

if all conditions are true than do actions else do actions:

condition:
if LootCheck greater than 1

actions:
hero drop item beeing manipulated from hero manipulating item

game display to all players: you cant carry 2 weapons...

Set LootCheck=0

else actions:
do nothin


2)Event:
unit loses an item

condition:
item class of last droped item = PERNAMENT

Action:
set LootCheck=0

and it works 8)

like i said tnx for improving my triggering skills

âàì âñåì ïèçäà!!!

sorry for my english i could have done better but im too lazy :lol:




[/code]
 
Status
Not open for further replies.
Top