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

Question about items

Status
Not open for further replies.
Level 6
Joined
Sep 13, 2013
Messages
155
how to make items stackable ?
for example if I bought two healing salves, it give me 2 healing salves in one slot instead of 2 healing salves each in a slot.

also, how to make items muted when picked up by other players who don't own the item ? should I create a muted version of each item in my map and then make trigger based on if the one who is picking up the item is not the owner then create a muted item and give to the hero and also remove the picked up item ?
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
you need a system that manipulates remaining charges on an item.

For example when you buy Healing Salve and already have healing salve in your inventory, the system should detect you buying it and checking your inventory for other healing salves. If it found any, it removes bought item and sets remaining charges on the item already present in your inventory to "remaining charges +1"
 
Level 6
Joined
Sep 13, 2013
Messages
155
Thanks for replies.
I wanted to know if there are any good damage detection systems in this website if you can suggest them to me ?

I had another question as well, how to make an AI ?
I wanted to create an AI for an AoS style map, which should be something like DotA.
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
Thanks for replies.
I wanted to know if there are any good damage detection systems in this website if you can suggest them to me ?

I had another question as well, how to make an AI ?
I wanted to create an AI for an AoS style map, which should be something like DotA.

Best one around here imo: http://www.hiveworkshop.com/forums/spells-569/physical-damage-detection-gui-v1-0-0-2-a-231846/

For AI there are tutorials in the Tutorials section. You can also take a look at these systems. I never use them myself so I am not really sure if they suit what you need or not though :p
 
Level 6
Joined
Sep 13, 2013
Messages
155
that was not the thing I wanted. what I meant from AI is an AI for creeps and towers, not for heroes.
For example, the first priority of the tower is to attack an enemy who is attacking an allied hero in its range, the second priority is to attack an enemy who is attacking the tower itself, and the third is to attack an enemy which has the lowest hp.
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
that was not the thing I wanted. what I meant from AI is an AI for creeps and towers, not for heroes.
For example, the first priority of the tower is to attack an enemy who is attacking an allied hero in its range, the second priority is to attack an enemy who is attacking the tower itself, and the third is to attack an enemy which has the lowest hp.

You should have stated that beforehand instead of causing confusion :p

Well, as far as I know there isn't any system like that around here, you need to trigger it yourself. Good luck.

edit

The basic concept is a nested if (if-then-else within another if-then-else). First you check if there is any allied hero around, if yes check for enemies and attack them, else switch to checking the second priority. Do likewise for the third priority as the else of the second one. The lowest hp check could either be coded the simple way or the better, more complex way.
 
Level 6
Joined
Sep 13, 2013
Messages
155
and do you think it will be done just with a simple triggering ?
I think if I trigger these it will target the unit that I want for a short period, because the AI itself has other priorities. For example if I make a trigger about if there are any enemy heroes in range which are attacking nearby allied heroes then target them, the tower will target it but it will change target whenever it detects a low hp unit is in its range, no matter if the hero is still attacking the ally or not. I want something to reset AI.
 
Status
Not open for further replies.
Top