Yeah, i've been learning JASS for about a day now, and i want to create a trigger for my map. and i must say, i pretty lost.
Í want my trigger to, whenever a unit picks up an item, that item is removed, and then a dummy unit spawns inside a region called 'inventory [player ID number]', and then that dummy unit recieves a copy of the item that was being picked up.
could anybody help me out here?
here's the function ive worked out so far:
Í want my trigger to, whenever a unit picks up an item, that item is removed, and then a dummy unit spawns inside a region called 'inventory [player ID number]', and then that dummy unit recieves a copy of the item that was being picked up.
could anybody help me out here?
here's the function ive worked out so far:
JASS:
function pickup takes unit picking, item picked returns nothing
local player pickplayer = GetOwningPlayer (picking)
//does this return "Player(id) or just "id"??
call CreateUnitAtLocByName (Player(6), dummy, GetRectCenter(gg_rct_inventory_XX)
//as you can see, i need to find out a way to find out whose inventory to spawn the unit in.
//i also need to find out how to create the function which triggers this one.