• 🏆 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!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

[Spell] Help! Spell pick item

Status
Not open for further replies.

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Unfortunately, you are pretty restricted in picking random items.

  • Set p = (Position of <unit>)
  • Custom script: call MoveRectTo(udg_Rect, GetLocationX(udg_p), GetLocationY(udg_p))
  • Custom script: call RemoveLocation(udg_p)
  • Set item = (Random item in Rect)
Requires declaring global region: 'Rect' at map initialization trigger. Customize width and height.
 
Status
Not open for further replies.
Top