Upgrade shop ?

RedSword

New Member
Reaction score
4
Hi everyone,

I'm wondering : Is it possible to makes a friend shop or a neutral shop selling directly upgrade ? Or we need to sell unit / upgrad and do something via triggers ?, because I tryed to makes a friend building with saleable upgrades with the shops ability and didnt work.

Thx in advance, RedSword
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Yes. Something along these lines
Code:
E - A unit sells an item
C - 
A - If -
      Item being manipulated equal to Upgrade1
     Then -
       Research Upgrade1 for owner of buying unit
       Remove item being manipulated
       Else -
          If -
          (Repeat for all upgrades)
 

Fallen-Kid

New Member
Reaction score
12
Did you put the sold upgrades under researches available?not sure if it works but that 'could' be the prob
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Hhmmm... you could to it as fallen said, but it would be the same thing as items.
 

RedSword

New Member
Reaction score
4
Yes Fallen Kids, the researches I want were put in "Researches available", but when I play, I don't see them, even with a goblin merchant which I removed all his items.
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Oh, also, make sure to remove the upgrade for the player, that way a player doesn't do the same upgrade twice.
For this you can add a boolean array, size 12.

If - Item being manipulated equal to Upgrade1
Upgrade1[Player number of owner of hero manipulating item] = False
Then -
Research Upgrade1 for owner of buying unit
Remove item being manipulated
Set Upgrade1[Player number of owner of hero manipulating item] = True
Else -

False would mean the player doesn't have that upgrade yet.
True would mean the player already researched the upgrade, and it would skip the 'Then' actions.
Hhhmm.... a "Money back" would be nice in case they buy the same upgrade. Or better yet, add a requirement for the player.
 

RedSword

New Member
Reaction score
4
But would it work if I use it to upgrade 1 level per buy ? And I'd use an integer condition to check if the research isnt already at the max level.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> would it work if I used it to upgrade 1 level per buy?

If triggered correctly, yes.

And, if you base your item on a Power Up, you don't need to remove it. And you can still buy it if your inventory is full.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top