- Joined
- Jul 15, 2014
- Messages
- 39
I was thinking about creating a map where u can trade items in stacks. Like wood for food etc, with changing exchange rates. And u can trade with any unit controlled by ai on the map.
Here's in 5 articles what i think i would like to make possible:
1. A hero controlled by player comes close to a unit that has items (unit is not controlled by player).
2. Player clicks on an item in that unit. That item will be item for exchange #1.
3. Player clicks on an item in his hero inventory. That item is for exchange #2.
4. At that point in scoreboard or somewhere else player can see exchange rate which that unit desires (stored in some variable).
5. Player can then click at his ability - buy to exchange #1 for #2 at the rate.
Maybe there are implemented similar pieces of code that i can use?
And if no the question would be:
Can article 2 be done? How do i click at other player's unit item and get it as a variable?
I dont see any related events - like mouse click in some region of interface...
On other articles it seems ill be able to do it.
Here's in 5 articles what i think i would like to make possible:
1. A hero controlled by player comes close to a unit that has items (unit is not controlled by player).
2. Player clicks on an item in that unit. That item will be item for exchange #1.
3. Player clicks on an item in his hero inventory. That item is for exchange #2.
4. At that point in scoreboard or somewhere else player can see exchange rate which that unit desires (stored in some variable).
5. Player can then click at his ability - buy to exchange #1 for #2 at the rate.
Maybe there are implemented similar pieces of code that i can use?
And if no the question would be:
Can article 2 be done? How do i click at other player's unit item and get it as a variable?
I dont see any related events - like mouse click in some region of interface...
On other articles it seems ill be able to do it.