[Trigger] Can't buy 1 more then 1 unit help!

GfameVideos

New Member
Reaction score
2
This is what i have:

I have a (Hero Selection Shop aka unit Tavern) which sells units.

I want every player only to be able to buy 1 unit of that tavern?
And if that unit dies, they can pick another 1? please?

(Food way Can't be used)

--Soorry for all help i need, as i created alot of threads on this sub-forum--
But thanks all for the help <3
 

Happy

Well-Known Member
Reaction score
71
make an integer varible array (for every player) and set it to 1 if the player has already a hero...then trigger that every hero hes choosing then is removed immediately...if the hero dies set it to 0 again and the player is able to choose another one again...
 

GfameVideos

New Member
Reaction score
2
make an integer varible array (for every player) and set it to 1 if the player has already a hero...then trigger that every hero hes choosing then is removed immediately...if the hero dies set it to 0 again and the player is able to choose another one again...

Can u make it, i don't exactly know what u start with :D
 

Conal

Member
Reaction score
12
These should get you started. Add conditions where necessary.

Trigger:
  • Awesome Trigger
    • Events
      • Unit - A unit Sells a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Player_Bought[(Player number of (Owner of (Sold unit)))] Equal to 1
        • Then - Actions
          • Game - Display to (Player group((Owner of (Sold unit)))) the text: Stop that.
          • Unit - Remove (Sold unit) from the game
        • Else - Actions
          • Set Player_Bought[(Player number of (Owner of (Sold unit)))] = 1

Trigger:
  • Another Awesome Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
        • Then - Actions
          • Set Player_Bought[(Player number of (Owner of (Triggering unit)))] = 0
        • Else - Actions
 

GfameVideos

New Member
Reaction score
2
These should get you started. Add conditions where necessary.

Trigger:
  • Awesome Trigger
    • Events
      • Unit - A unit Sells a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Player_Bought[(Player number of (Owner of (Sold unit)))] Equal to 1
        • Then - Actions
          • Game - Display to (Player group((Owner of (Sold unit)))) the text: Stop that.
          • Unit - Remove (Sold unit) from the game
        • Else - Actions
          • Set Player_Bought[(Player number of (Owner of (Sold unit)))] = 1

Trigger:
  • Another Awesome Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
        • Then - Actions
          • Set Player_Bought[(Player number of (Owner of (Triggering unit)))] = 0
        • Else - Actions

lol ye, but they aint heroes, there units, nobody has heroes. So what i change that to? :(
 
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