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..
to my nooby knowledge it should work but it doesn't. please help.
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.