[HELP] Hero still receives gold when

maskurkur

New Member
Reaction score
0
I try to make my hero pick coins automatically when he goes near the gold coins. I manage to make it automatically but when the move back, he still receive gold once more time. Please help how to fix it. Thank you

attachment.php
 

Attachments

  • collect gold.JPG
    collect gold.JPG
    53.8 KB · Views: 525

tmow

New Member
Reaction score
7
why the event..and u have it on a loop...just make it so when the unit recieves and item or picks it up..give 10 gold to player owning that unit.

oops didnt see automaticly...just have it when a unit enters region..as long as X ammount of units (make the unit gold) is in the region...make it have locust and not clickable...and just when u enter that region..if that unit is there give that player 10 gold and remove the unit
 

maskurkur

New Member
Reaction score
0
@tmow: if I use enter region, I'll have to make many regions because I make lot of gold coins. If it's possible, I want to avoid using region

@jig7c: perhaps, but I don't know how to fix the leak, can you help?
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Try giving it to the unit, don't have to remove it, since its already being given. Also, set the position of pac man to a variable, and use
Trigger:
  • call RemoveLocation (udg_YourVariableName)
to clear it at the end.
 

Nexor

...
Reaction score
74
Add a condition if the item is unhidden only pick it then, and when it's picked hide it.
 

cryowraith

New Member
Reaction score
7
Er... Isnt the gold coin item auto-consumed? Like the tomes and stuff? When you pick it up it already give gold and you give it more gold in the trigger?
 

Nexor

...
Reaction score
74
I tried making this, and found that when it's picked, the trigger still can see the item.
 

maskurkur

New Member
Reaction score
0
@Nexor: TYVM, it works! :thup:

One more question, I can pick the coin automatically when I move near it and I can also get the coin by right-click to it. The question is "how can I disable the right-click?" so I don't/can't right-click the coin. I just want to pick it by moving near it. Thanks
 

Nexor

...
Reaction score
74
increase the region size a bit

or/and

at gameplay constants there is an option afaik for item pickup range
 

N(O.O)B

New Member
Reaction score
27
increase the region size a bit

or/and

at gameplay constants there is an option afaik for item pickup range

Very bad way of solving it imo, as you can still right click it, this will just make the autopickup trigger before the right clicking, which is probably not what he's getting at. I think something like this is more along the lines of what he's looking for:
 

Attachments

  • PickUpCoins.w3x
    13.6 KB · Views: 201

maskurkur

New Member
Reaction score
0
Very bad way of solving it imo, as you can still right click it, this will just make the autopickup trigger before the right clicking, which is probably not what he's getting at. I think something like this is more along the lines of what he's looking for:

tyvm for the trigger, this is what I've been looking for :thup:

so, it use unit action not item.....nice, never thought about it :D
 
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