Warcraft III resources & community, 2003–2006 · archived

PLLZZZ HELP "a simple trigger" whats wrong?

8 posts
#1

PLLZZZ HELP "a simple trigger" whats wrong?

1.a unit recieved an item

2.a unit must drop picked item if in inventory he has an item IRTIFACT-class , and CAMPAIGN -class

3.artifact-class items 1or more AND campaign-class items 1or more(in invenory) = drop picked item
how can i reallize this?

-event
UNIT-a unit acquires an item
-conditions
(((Hero manipulating item) has an item of type (Random level 8 Artifact item-type)) Equal to True) and (((Hero manipulating item) has an item of type (Random level 0 Campaign item-type)) Equal to True)
-actions
Hero - Drop (Picked item) from (Hero manipulating item)

Plzzz help... whats wrong??? :cry:
#2
when u adress a random item, the instant you run the trigger the randomizers selects one specific item type from the random range (Random Level 8 Artifact item-type) and does the comparisson. Obviously, a match would be very odd.

Here's what your Trigger should look like


EVENT:
Unit - A unit Acquires an item

ACTIONS:
For each (Integer A) from 1 to 6 do (Actions):
     -If:
        if conditions:
        -(Item-class of (Item carried by(Hero Manipulating Item)in slot (Integer A))) Equal to Campaign
        if actions:
        -For each (Integer B) from 1 to 6 do (Actions):
                -If:
                     if conditions:
                     -(Item type of(Item caried by(Hero manipulating item)in slot (Integer B)))Equal to Artifact
                     if actions:
                     -Hero - Drop (Item being manipulated) from (Hero manipulating item)
                     -Skip remaining Actions
#3
also... the function "Picked Item" is used with "Pick every item in rect" functions... it refers to the item being evaluated at that time

Pick every item in Rect007 and do:
   -if (Type of (Picked Item) equal to(Tome of Experence)) then (Remove(Picked Item))


As you can see in the other post... to get the item aqcuired you use "Event Response - Item Being Manipulated"

well, i hope that helped!
#4

lol

OMFG its works!!!!!!!!!!!!!!!
THANK YOU VERY MUCH!!!

Drop item 1
Events
Unit - A unit Acquires an item
Conditions
Actions
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Campaign
Then - Actions
For each (Integer B) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to Artifact
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Else - Actions
Skip remaining actions
Else - Actions


////////////////////////////////////////////

Drop Item 2
Events
Unit - A unit Acquires an item
Conditions
Actions
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Artifact
Then - Actions
For each (Integer B) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-class of (Item carried by (Hero manipulating item) in slot (Integer B))) Equal to Campaign
Then - Actions
Hero - Drop (Item being manipulated) from (Hero manipulating item)
Else - Actions
Skip remaining actions
Else - Actions


But now i need 2 triggers....

(First Trigger)
*if first i get CAMPAIGN(andARTIFACT after) = drop artifact
(Second Trigger)
*if first i get ARTIFACT(andCAMPAIGN after) = drop campaign
#5
plz dont spam the JASS forum. this should be in the Spells forum.
#6
ohh... you are right...

uhmmm let me see if i can fix that......by the way.. how do you export GUI triggers like that?? i hat to type the whole thing
#7
you dont.
#8

hehe

Just right click on the trigger in the Trigger Editor and select "copy as text" ...