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!
Hi, i want to make a rpg, but i have a problem. I want to make, that if you save or load your character, that your items cannot picked up by other players.
pick hero of player that typed -save
integer a 1-6
Loop
pick item in slot A, and set ownership to owner of hero
2nd trigger
unit aquires an item
if
owner of unit =/= owner of item
set temp point loc of object being manipulated
move item being manipulated to temp loc
else
Do you want to:
1. Load a hero with item(s) on it
2. Drop the item(s) to the ground
3. Type -repick (or whatsoever command that allows you to repick your heroes)
4. After repick, you picks up that item back, and your new unit can't pick it up ?
ok i explain it.
i made a rpg with save/load system, everything works, u can load ur complete char.
but the problem is. if u got a nice item, u can type -save and give that item another player, so that he can also type -save. no both have this item.
same as with load:
u just load ur char, giv the item another player, and dont save.
i want that saved and loaded items can only be used by the saved/loaded char.
set the item's user data (if you aren't using it) to the handle id or unit index of the first unit to pick it up (on pick up, set the user data, and only if the unit can pick it up in the first place). From there, when a unit picks it up, check if the unit can use it and make sure that the data stored in the item is either 0, the handle id, or the unit index of the unit.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.