• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Dying player lose all his items

Status
Not open for further replies.
Level 16
Joined
May 2, 2011
Messages
1,345
Hello,

I am wondering is there a way to do that? I had 2 thoughts:

  • Either if player lost all his structures he lose all his items and are dropped in last structure (regardless of whether his hero is dead or not)
  • When a hero dies there is chance that he dropps one of his items
thoughts?

This is more like a brainstorm I havent started triggering it yet or anything
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
I think you can access the items of a dead hero, so it should not be too hard. Pick all units, loop through their inventory, drop their items and move them to the position.
The second one is a similar approach just with one unit.
 
Status
Not open for further replies.
Top