HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Only 1 item of type on Hero. HELP!

05-28-2004, 08:46 PM#1
KurupteD.
Hey ive tried for like 2 hours on this trigger that drops the item the hero is trying to buy/pick up if he already has the same item in his inventory already. I dont want more then 1 type of armor/weapon on the hero of the same type at a time. Ive tried with the following trigger and it dosent work, it just drops the item as soon as he gets it even if he dosent have the same type to begin with. PLZ HELP ME!

EVENTS:
Unit - A unit owned by Player 1 (Red) Acquires an item

CONDITIONS:
((Triggering unit) has an item of type (Item-type of (Item being manipulated))) Equal to True

ACTIONS:
Hero - Drop (Item being manipulated) from (Triggering unit)
((add warning message here))
05-28-2004, 10:07 PM#2
Miyu
Not a pro on triggers for heros but... I don't think you need the (Being manipulated) that's whats messing it up...
05-29-2004, 01:02 AM#3
Pyrus
Well the method I was thinking of using for this goes a little like this:

They initially have a weapon and armor, based on model, etc, that is hardcoded ito a spot. The weapon/armor cannot be dropped. Or sold.

The weapons/armor you buy and find are like runes.

I had triggers that detected when these runes were used and dropped the weapon/armor from the slot and gave him the new one.

However this is not feasible with large assortments of weapons and armour. But that's the drawback.
05-29-2004, 02:06 AM#4
KurupteD.
Quote:
Originally Posted by Pyrus
Well the method I was thinking of using for this goes a little like this:

They initially have a weapon and armor, based on model, etc, that is hardcoded ito a spot. The weapon/armor cannot be dropped. Or sold.

The weapons/armor you buy and find are like runes.

I had triggers that detected when these runes were used and dropped the weapon/armor from the slot and gave him the new one.

However this is not feasible with large assortments of weapons and armour. But that's the drawback.

Yea that isnt really what I'm looking for, if any of you have ever played legacies :tides of the serpent, you know what I mean by only allowing one type of item at a time. Please if anyone knows how to help me speak up.
05-29-2004, 02:55 AM#5
Arohk
Code:
E:
Einheit - A unit Erwirbt einen Gegenstand
C:
A:
For each (Integer A) from 1 to 6, do (Actions)
    Schleifen - Aktionen
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            'IF'-Bedingungen
                (Item carried by (Triggering unit) in slot (Integer A)) Ungleich (Item being manipulated)
                (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Gleich (Item-type of (Item being manipulated))
            'THEN'-Aktionen
                Held - Drop (Item being manipulated) from (Triggering unit)
                Skip remaining actions
            'ELSE'-Aktionen
                Do nothing

have fun :p
05-29-2004, 04:34 AM#6
KurupteD.
Quote:
Originally Posted by Arohk
Code:
E:
Einheit - A unit Erwirbt einen Gegenstand
C:
A:
For each (Integer A) from 1 to 6, do (Actions)
    Schleifen - Aktionen
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            'IF'-Bedingungen
                (Item carried by (Triggering unit) in slot (Integer A)) Ungleich (Item being manipulated)
                (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Gleich (Item-type of (Item being manipulated))
            'THEN'-Aktionen
                Held - Drop (Item being manipulated) from (Triggering unit)
                Skip remaining actions
            'ELSE'-Aktionen
                Do nothing

have fun :p


Great, now the hard part is translating THAT into english, sigh, thanks for the help.
05-29-2004, 03:26 PM#7
weaaddar
grab the RPG engine in the link in my signature it should do what you want.

And heres a translation of what his stuff says:
Code:
E:
Event - A unit Picks up an item
C:
A:
For each (Integer A) from 1 to 6, do (Actions)
    Loop - Action
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            'IF'-Condition
                (Item carried by (Triggering unit) in slot (Integer A)) not equals (Item being manipulated)
                (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) equals (Item-type of (Item being manipulated))
            'THEN'-Action
                Hero - Drop (Item being manipulated) from (Triggering unit)
                Skip remaining actions
            'ELSE'-Action
                Do nothing
05-29-2004, 07:25 PM#8
KurupteD.
Thanks that worked, but I also have yet another problem, I dont want the hero to be able to have 1 of each type of armor, So i was thinking, ill make all the armor level 8, and I want to make the hero drop any items hes trying to pick up that are level 8, therefore making a foolproof way that he will only have one type of armor at a time. How do I do this?
05-29-2004, 11:15 PM#9
weaaddar
I definetly suggest you check out the RPG engine in my signature it does what you ask for and much more organized then you can imagine.
05-31-2004, 04:20 PM#10
TGhost
weeaader or whatever your name is
i have looked in your signature and found the topic but i cant find where to dl the rpg system sry for asking so noobish but i cant find the poster where the latest version is up for download
05-31-2004, 04:29 PM#11
weaaddar
its on the first page of the thread but if you really can't find it:
http://weaaddar.wc3campaigns.com/EquipItem.w3x