• 🏆 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!

Problem with Building owners

Status
Not open for further replies.
Level 21
Joined
Jan 5, 2005
Messages
3,515
i have a problem with the owning properties of a building. i wanted a building to be selectable by all units on a team so it can be upgraded but only actually owned by one player. atm i have a trigger where when a player selects the building it does this:
[trigger:1:2fdfae1b4b]
Player - Make Player 11 (Dark Green) treat (Triggering player) as an Ally with shared vision and full shared units
[/trigger:1:2fdfae1b4b]

which allows the upgrades to be brought but then when you upgrade it, it makes a weird noise (which i can fix) and a thing saying "you now have controll of blah" (which you can see i have fixed below) and also if you select another unit owned by dark green you can controll it. so i made this trigger:

[trigger:1:2fdfae1b4b]
Deselect Full Sharing1
Events
Player - Player 1 (Red) Deselects a unit
Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Triggering unit)) Equal to Head Quarters On map
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
Then - Actions
Player - Make Player 11 (Dark Green) treat (Triggering player) as an Ally with shared vision
Else - Actions
Do nothing
Cinematic - Clear the screen of text messages for (All allies of Player 1 (Red))
Multiboard - Show all multiboards
[/trigger:1:2fdfae1b4b]

now if you select an unit owned by dark green while having the head quarters selected it shows the green ring of an allied unit but when you select it it is removed. this is a small problem but i think its annoying. can i fix this by having the head quarters as a shop selling the upgrade but owned by dark green but if i do that wont enemies be able to buy from it? any other solutions?
 
Level 12
Joined
Jan 13, 2005
Messages
1,138
You can force them to share units but then put in a trigger so that only the owner of un its are able to give it orders, other than that I have no clue.
 
Level 36
Joined
Mar 15, 2006
Messages
7,945
yeah...a trigger making a shop usable by only one team....well, if all else fails, you could make it like AA (for example) where they have the specific team shops in an area where only the specific team members can get to them. as well, you could create the shop as a neutral building and used text commands to get certain upgrades (like if player red types -upgrade1) give 100 gold to player brown (team 1's neutral ally) and then make it so that player brown trains the upgrade and the upgrade applies for all allied units. not sure how you would do that last bit, but i think it is possible. thats only if you want to do upgrades, like teching, steel forged swords, etc etc.

Another idea:
(For Items or Upgrades)
Have player brown be neutral for team 1 and player dark green be neutral for team 2. Create an upgrade shop belonging to player brown for team 1 in team 1's area. this way it would appear as an enemy building to team 2 and they wouldn't be able to use it. repeat for team 2 substituting player brown for player dark green.

(For Tomes)
Use the system in most of the newer hero linewars. When a player types -int then the number (the number would be the number of gold worth of tomes they would get) the game subtracts the number of gold and then adds the number of stats.
For example:
Player 1 types -int500
Subtract 500 gold from (Triggering Player)
Add 50 Intellect to Blademaster belonging to Player 1

Good luck!
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
right im going to test now, check this space because i will edit this post in about 30 mins today or tommorow sometime.

EDIT: ok it didnt work. i tried many times but i could not get the HQ's to sell me a unit. when i changed the ownership to my colour, it would sell me the unit. so i think its impposible to sell units if the seller isnt neutral passive or owned by the person its selling it to. any other ways around this?

i have thought about changing the units owner to the person selecting it or neutral passive when selected, this has one major problem, it means that it takes on the traits of the owners colour when selected. so if red selects it, it becomes reds so all the other players see it as reds, even if u keep the colour (duh). i want it to stay as greens. not only that i want it so more than one person can select it at a time. i was thinking about putting a huge invisible (no model) but selectable shop in the position of the hq, then having a trigger upgrading the hq when a unit is brought from this. it would work but i would prefer if there was a object editor method.
 
Level 36
Joined
Mar 15, 2006
Messages
7,945
OH, i see. Hmmm....well, you could make it so that whatever the primary source of icome is in the game (be it creep bounties pvp bounties etc etc) whenever a playr acquires gold, it gets sent to dark green or the appropriate colour for the team, then the dark green player auto updates te hq depending on how much gold hasbeen auto pooled to it. i'm thinking like battleships, except in battleships, the neutral guys for each team have units, so they have their own way of getting money for the neutral upgrades, but this way, it still works the same, except the resources for the upgrades are acquired through players. As well: you could always set it so that the hq upgraded on some other condition (a player gets a number of kills, achieves this yada yada etc etc).
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
no (sorry for saying no to all your ideas :( ) it has to be from a single players money. that forces the players to work as a team (by sharing money) or to play strategically. i dont want to hand a win to the players on a plate by a major kill-a-thon, i want them to use their heads and team work. mabey one player saves up for hq uprgrade, while another saves for better towers, mabey they give all their money to one player and he works as a builder. it is up to the players to make the best strategy to win.
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
perhaps, mabey i could give armor to the big sword hero, magic defence/attack to the spell caster. agility and speed to the flyer unit ect...i depends how i feel. none the less i want the hq to be upgradably by anyone, i dont see how i could assign the most important job to one player. also even if it did people would prefer/avoid that role, like playing grey in WH40K. not only that, its not set by slots, you chose your hero at the start. it no-one chose the upgrader, or if everyone did, it would leave certain abilities unused or over used. and if they were over used i would have the same problem of making it so everyone can buy the upgrade from whatever building! i dont think that will work, i could make it work if i set a colour to a hero, but that takes away choice and i want the players to chose how they play, chose if they win or lose.
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
ok i partly fixed the porblem by adding the "select unit" ability to the HQ. it allows units to be perchased by anyone allied to the owner of the HQ. now the problem is that the number 1 shows in the corner to signify that there is one in stock. it is slightly annoying but it did give me an idea. i might make it so that players buy Mini Hqs from the main hq. in the mini HQs they can buy upgrades to armour, strength, intelligence ect for the whole team, just as brad said. then once a certain amount of these mini hqs have been perchased (varying for the number of players) the main HQ will automatically upgrade itself.

having said that, i would still like to know if its possible to have the number 1 removed.
 
Status
Not open for further replies.
Top