Non droppable but pawnable Item ?

ZeldaFan

New Member
Reaction score
1
Hello, today id like to make the heroes of my rpg unable to drop an item on the ground or give it to another player but they still can

  • Change its slot in inventory
  • Put it into their backpack (blackroad style)
  • Sell it to shop


I tried to monitor the order numbers (a la "852002") but there are no orders for "unit loses an item" So i decided to attack this angle

Now id like to check if the new owner of the item is my backpack or an ally player ? How could it be done ? :banghead:
 

Exide

I am amazingly focused right now!
Reaction score
448
I'm not sure about the giving to another player - part.
All I could think of was to make a region next to a shop, put a circle of power on top of it. And then have a trigger when a Unit enters this region. It checks for these items you speak of. And if the entering Unit has any of this items, create a dialog which would ask the player if he/she wants to sell *item* for *gold* - 'Yes/No'

It's not a good solution, but it's the only thing I can think of. Sorry :p

Unless there's a way to have a trigger check for an item being dropped on the ground. And then return it to it's owner. But I don't know about that..
 

ZeldaFan

New Member
Reaction score
1
:banghead: :banghead: The item dropped on the ground thing is no problem cus theres a condition for that 'item has no owner' BUT the trick is detecting wether i gave the item to my backpack or to an ally player

As for the dialog/shop ill keep that in mind altho im still looking for the original solution :) I cant seem to find no "Item's new owner" in the editor ^^
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Under "player" is a condition for "owner of item".


The event "loses an item" fires a bit too quick though.
If you want to use it, you need to wait a bit (0.2 should do) before testing for the new owner.
 

ZeldaFan

New Member
Reaction score
1
Actually i made it work, but 0.2 was too short :) I also used a secondary "Acquires an item" trigger that i turned on after that lapse of time

Now i will try and simplify tell you if it worked


By the way, using "wait" will completely screw multiinstances of this trigger :( Please tell me it wont :)
 

Exide

I am amazingly focused right now!
Reaction score
448
I hope it works for ya. And could you please post your trigger/triggers if you get it to work. It sounds interessting :)
 

ZeldaFan

New Member
Reaction score
1
I will when its done.. Gotta remind me tho :)

This to me spells Buffer system to avoid some newer instance of the trigger trumping another.. altho the wait delay is quite short
 

Sim

Forum Administrator
Staff member
Reaction score
534
If we have your trigger we can tell you if it is MUI. If it is JASS please post it in the JASS section ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top