• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Question about building sharing.

Status
Not open for further replies.
Level 7
Joined
Jun 19, 2017
Messages
141
Hello, im trying to make a couple of buildings with UPGRADES in them, shared to all allies of the Computer player. It seems that the editor is lacking a function like this and the most relevent one is this;

Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
Loop - Actions
Unit - Change ownership of Town Hall 0000 <gen> to (Picked player) and Retain color

However this function doesn't seem to work as i expect it to, and it loops through the picked players, changing ownership of the unit from the first player in the force to the last one. Any ideas how can i make shared buildings with upgrades in the most easiest and short way?
 
Level 18
Joined
Nov 21, 2012
Messages
835
There's work around:
create abilities for each upgrade- based on "charge gold and lumber" ability
in those abilities set field "Data-Charge Owning Player" to "false"
name it "upgrade XXX" set icon/gold/lumber

add abilities to building that supposed to sell "upgrades"
building should have abilities: Select Unit Ane2 , Sell Units Asud and of course upgrade abilities made before
Set field "Unit classification": Mechanical, Neutral

then, when any player uses ability (buys upgrade) - use trigger like this
  • Untitled Trigger 002
    • Events
      • Unit - Goblin Merchant custom 2 0088 <gen> Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Charge Gold and Lumber custom
        • Then - Actions
          • Unit - Remove Charge Gold and Lumber custom from (Triggering unit)
          • Unit - Add Charge Gold and Lumber to (Triggering unit) <if you have multilevel upgrades>
          • Game - Display to (All players) the text: abi
          • Player - Set the current research level of Iron Forged Swords to 1 for Player 1 (Red)
        • Else - Actions
  • add next upgrades ....
 
Last edited:
Level 7
Joined
Jun 19, 2017
Messages
141
Dr Super Good your idea is very good but i use the building so the players can upgrade the computer's units. So this way upgrades that have like more than 1 rank probably won't update in the other player's building of the same type.
 
Status
Not open for further replies.
Top