how to make gold go straight to coffers from buying the bundle

helpmeplease

New Member
Reaction score
7
In my map there's a trade building where you buy bundles of lumber and gold for 2 times the opposite resource. when i buy it it just sits on the ground near it waiting to be picked up. i want it to go straight to the gold and lumber coffers tho. how do i do this?
 

FrozenShadow

I am a WolfieeifloW fan.
Reaction score
75
There is a field in the 'Items' category where you can select something like:

Use automatically when obtained.
 

helpmeplease

New Member
Reaction score
7
it still just appears on the ground when i buy it. i want it to actually go straight into resources. not have to be picked up at all
 

Bankde

Member
Reaction score
20
I'm not sure what you really want but I will give you many solution.

First, normally the items call GOLD COIN or BUNDLE FOR LUMBER will be automatically used when picking up and also buying is one type of picking the item so it should automatically go to your resource when buy. (Just copy gold coin in object editor and change its ability to the value you want.)

Second, some game set this trigger when they have trading mode. (Example is "Battle Ship" and "Battle Tank")

Trigger:
  • Trading
    • Events
      • Unit - A unit comes within 300.00 of Merchant
    • Conditions
      • ((Triggering unit) has an item of type Gold Coin "500") Equal to True
    • Actions
      • Item - Remove (Item carried by (Triggering unit) of type Gold Coin "500")
      • Player - Add 1000 to (Owner of (Triggering unit)) Current lumber


I recommend the first one but I'm not sure why you have problems about that. If you still having problem, use this

Trigger:
  • Gold to Lumber
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Sold Item) Equal to Gold Coin
    • Actions
      • Player - Add 1000 to (Owner of (Triggering unit)) Current lumber


And set that type of item to +TOME STATS and set the stats bonus = 0
(Not recommend and there is no reason to use this trigger except you really had the problem.)
 

Bankde

Member
Reaction score
20
I have already told you that if you buy item such as "Tomes or gold or lumber", it will automatically mean pick the item up.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Why not just have a small invisible hero at the shop ?!
No collision, no shadow and no model. ;)
 

Bankde

Member
Reaction score
20
then there'll be one on the ground as well..

I don't understand what's on the ground ?
Event-The unit comes within 300 range of Merchant
Condition- What ever you want...
Action- add 500 gold to owner of trigger unit.

What's on the ground ? There's nothing. :nuts:
 

Komaqtion

You can change this now in User CP.
Reaction score
469
He means he's currently able to buy an item called "Bundle of Lumber/Gold" but there's actually no elegible hero nearby to pick up the item, so it's just createdc on the ground instead...

Either do what I said, or create a trigger with the event "A unit Sells an item (from shop)"

Then add this condition:
"(Item-type of (Sold item)) Equal to Bundle of Lumber"

And then add the actions:
"Item - Remove (Sold Item)
"Player - Add <Amount of lumber> to (Owner of (Buying unit)) Current lumber
 

helpmeplease

New Member
Reaction score
7
hang on. can i make the building that sells it selectable as the buying unit, and make it have an inventory so when i buy the lumber or gold it just takes it straight away? the trade building is buildable buy your forces. and u own it
 

tommerbob

Minecraft. :D
Reaction score
110
Just do what Komaqtion says. Make a trigger that looks like this:

Trigger:
  • Events
    • Unit - A unit sells an item (from shop)
    • Conditions
      • (item-type of (sold item)) equal [your bundle of lumber or gold]
    • Actions
      • Item - remove (sold item) from the game
      • Player - Add [gold or lumber amount] to (owner of (buying unit)) Current lumber or gold
 

Xbing

New Member
Reaction score
0
edit: woops, didnt see the earlier posts, didnt see there was a page 2.

hang on. can i make the building that sells it selectable as the buying unit, and make it have an inventory so when i buy the lumber or gold it just takes it straight away? the trade building is buildable buy your forces. and u own it

i think that can be done, add an inventory ability to the selling unit and you might have to change the targets allowed for select unit, which is an ability the shop should have already. not really sure though.
 

helpmeplease

New Member
Reaction score
7
That trigger didn't work... it put the item on the ground and didn't give the gold. i have no idea why it didnt work.
 

helpmeplease

New Member
Reaction score
7
edit: woops, didnt see the earlier posts, didnt see there was a page 2.



i think that can be done, add an inventory ability to the selling unit and you might have to change the targets allowed for select unit, which is an ability the shop should have already. not really sure though.

i added the hero inventory ability to the "default active ability" and unit inventory to the normal abilities but it still doesn't have one.
 

helpmeplease

New Member
Reaction score
7
Just do what Komaqtion says. Make a trigger that looks like this:

Trigger:
  • Events
    • Unit - A unit sells an item (from shop)
    • Conditions
      • (item-type of (sold item)) equal [your bundle of lumber or gold]
    • Actions
      • Item - remove (sold item) from the game
      • Player - Add [gold or lumber amount] to (owner of (buying unit)) Current lumber or gold

this one
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top