• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

A question about share-able buildings.

Status
Not open for further replies.
Level 15
Joined
Nov 26, 2005
Messages
1,151
Hello forum.

I have a question:
Have you ever played survival/troll tribes? Well I need the same idea for the buildings.

I need this: When a player builds a building his allies can use all the spells the building has (even when far away from the building) and remove/place items inside the building inventory.

How's that done?

10x and +rep for answers!
 
Level 11
Joined
Aug 6, 2009
Messages
697
Hello forum.

I have a question:
Have you ever played survival/troll tribes? Well I need the same idea for the buildings.

I need this: When a player builds a building his allies can use all the spells the building has (even when far away from the building) and remove/place items inside the building inventory.

How's that done?

10x and +rep for answers!
Heres my idea,add the ability select user to the building you want to be able to be shared.
 
Level 7
Joined
Jun 6, 2010
Messages
224
  • Windu
    • Events
      • Unit - A unit Finishes construction
    • Conditions
    • Actions
      • Set MyForce = (All allies of (Owner of (Triggering unit)))
      • Player Group - Pick every player in MyForce and do (Actions)
        • Loop - Actions
          • Player - For (Owner of (Triggering unit)), turn Shared units On toward (Picked player)
      • Player Group - Remove all players from MyForce
Make sure the building has also the following abilities:

Unit Inventory
Select Unit/Hero (Select range should also be global if you wanna do things from afar)

since you get ownership of the unit, you can use any of its abilities, cast its spells, train its units etc.
 
Prince.Zero, you create a player group, but you never destroy it. If you destroy it, you won't be able of referring to it again; if you just remove the players, you won't be able of cleaning the leak. To prevent that, refer to those players by their index:
  • Trigger
  • Events
    • Unit - A unit Finishes construction
  • Conditions
  • Actions
    • For each (IntegerA) from 1 to 12, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Player(IntegerA) is an ally of (Owner of (Triggering unit)) Equal to True //Boolean comparison
          • Then - Actions
            • Player - For (Owner of (Triggering unit)), turn Shared units On toward (Player(IntegerA))
          • Else - Actions
:]

By the way, Windu, long time no see, what's up?
 
Status
Not open for further replies.
Top