• 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.

Help with Item droping Trigger

Status
Not open for further replies.
Level 3
Joined
Jul 17, 2005
Messages
36
alright, in my map i have classes, and alrdy made varible for them and when they enter game they get assigned classes. and i wanna make it so only certain classes can buy certain items. so for example i made all melee wepaons Misc. and heres my code that doest work..

Code:
Events
    .Unit - a unit sells an itme (from shop)

Conditions
    .(itme-class of (sold item) equal to Miscellanous)

Actions
    .if (all conditions are ture) then do (the actions) else do (else actions)
     
    If - Conditions
           .HeroTpye[(Player number of (owner of(buying units)))] equal to Melee

    Then - Actions
           .Do nothing
    Else - Actions
           .Hero - Drop (sold item) from (buying unit)
           .Game -  Display to (player group((owner of(buying unit)))) for 10.00 seconds the text: Your class may not buy this itme!"


to my nooby knowledge it should work but it doesn't. please help.
 
Level 3
Joined
Jul 11, 2005
Messages
50
your question is full of spelling mistakes but i will try to answer it

Trigger

Event
1. A unit Acquries an item.

Condition
1. Item Type of Triggering Item equal to (the item you want) And Triggering Unit equal to (the unit)

Action
1. If/then/else do multiable actions
If Action
1. drop triggering item
2. remove last dropped item from the game
3. disbly text message (whatever you want to say)
else actions
1. do nothing

the if actions are for if the unit type cannot buy the item type. you may need to make a simaler trigger for each unit/unit-type. I hope i was help.
 
Level 18
Joined
Apr 15, 2004
Messages
1,396
event
1.unit aquires item

condition.
1.None

Actions
1.if/then/else(multipleactions)
-if
--1.and multi conditions
---1.(item class of (aquired item) = to (whatever class)
---2.(unit type or class whatever) = to whatever
-then
--1.hero drop aquired item from aquiring9whatever that one is called) hero.
else
--1. nothing

trig two!

Code:
Events
    .Unit - a unit sells an itme (from shop)

Conditions


Actions
    
  .if (all conditions are ture) then do (the actions) else do (else actions)
     
    If - Conditions
           .and all conditions are true
           -conditions
                .HeroTpye[(Player number of (owner of(buying unit)))] equal to Melee

    Then - Actions
           .Do nothing
    Else - Actions
           .Hero - Drop (sold item) from (buying unit)
           .Game -  Display to (player group((owner of(buying unit)))) for 10.00 seconds the text: Your class may not buy this itme!"

now if you want to stop them from buying it all together i can make it look like that just send a pm and ill give a good trigger.

all this was without looking at triggers so some might be wrong.
 
Status
Not open for further replies.
Top