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

Big Problem!! Need serius help from a top guy.

Status
Not open for further replies.
Level 1
Joined
Aug 17, 2004
Messages
4
I have a problem...

i have a map iam making, and i want it so if you have a item like "Iron Sword" in your inventory..
then you got 1 item of type "Iron sword"
and then you buy 1 more "Iron Sword" but, in my map you can only have 1 item type of every item so if he now buy this second "Iron Sword" then its gonna drop that nr.2 "Iron Sword"... but how can i make it work?
i have tried on all wises.. Plz help me.

G.O.D bless you if you fix my problem. :cry:
 
Level 13
Joined
Dec 29, 2004
Messages
597
it's very simple.

Events:
Unit acquire an item

Condition:
Item Type equal to Iron Sword
Unit has item type of Iron Sword equal to true

Action:
Drop item being manipulated from triggering unit

If you wanna make a unit to drop any item with "sword" type if it already has "sword" type item, here is the algorithm

example:
there are iron sword, steel sword, silver sword, and admantium sword.

Events:
Unit acquire an item

Condition:
Item Type equal to Iron Sword
Or multiple:
Unit has item type of Iron Sword equal to true
Unit has item type of Steel Sword equal to true
Unit has item type of Silver Sword equal to true
Unit has item type of Admantium Sword equal to true

Action:
Drop item being manipulated from triggering unit

you just copy that trigger and change condition on:
Item Type equal to Iron Sword

to

Item Type equal to Steel Sword

Repeat it for another "sword" type item
 
Level 1
Joined
Aug 17, 2004
Messages
4
I don't know what you mean, there is no trigger who says Unit - Has item of type ----
:/ can you explain that becouse i need this fixed very fast.
 
Level 1
Joined
Aug 17, 2004
Messages
4
Yeah sure but when i test this 1 its not working he just drop the sword, the hero is allowed to have 1 sword and not 2 of same kind, becouse if he have 1 sword then nothing happens but if he buy 1 sword more then its gonna be like this he got 2 sword in his inventory and becouse he only can have 1 of that kind 1 of this Swords gonna drops, this that leopard have done is so he cant have the any swords!

God bless you if you can show the real problem, but thx leopard any way for a good try...
but it is wrong trigger i want.
 
Level 7
Joined
Dec 6, 2004
Messages
288
Settle down boys... You could try making a Variable, (since you're obviously pretty new and can't find conditions) the Variable is HasaSword, Empty Unit Group, o (Default), Then you add the Unit into the Unit group when they pick up the Item, so now, In conditions, make it check if unit is in HasaSword Variable, if so, Drop the Item that you picked up. You would of course need another Trigger for unit drops the Sword, to be sure to take it out of the Unit Group HasaSword. That's pretty close, haven't been on WE for a while, so i'm not 100% sure.
 
Level 13
Joined
Dec 29, 2004
Messages
597
Re: dud4e

wolf_kid_is_me said:
hey they gave u what u needed u said if they have 2 swords drop one.... what did he say!?!?! he told u exactly what to do unit aquires item item equal to toher swords drop acuired item what more do u want...

sorry guys, I mean not unit-has item type, maybe like hero-has item type or.. arghh. i forgot......

but i already had that trigger when i make Counter strike map, so that each player can only have 1 primary weapon, 1 grenade type, and so on. But i'm not in home right now. I save the map in my PC and i will see the trigger later and post it for you.

or maybe you can download my CounterStrike: PlantTheBomb map. It's open source so you can learn from that.
 
Status
Not open for further replies.
Top