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

Pedestal Capturing For Players

Status
Not open for further replies.
Level 6
Joined
Nov 3, 2005
Messages
103
Throughout the whole map I have pedestals that units need to be near in order to capture them. While the units are within the point's range I want the game to add points towards the pedestal for the unit's owner. Once those points are above 100 the pedestal will switch owners to the capturing player or team and they'll begin to obtain resources. When the owner changes other teams can capture it back but they'd have to work backwards, subtracting the owner's points back to 0 so that they can capture it.

Where it gets tricky is when and how to store all the variables. I also don't want the game to add up points when the range of the pedestal finds units owned by different player teams, not just the player so that players would need to fight each other off them.

Unless there's a more efficient way of doing this I'm assuming each pedestal's "point" variable needs to have an array for each separate player team, so that players can have FFA games on the same map.

Any ideas?
 
Level 10
Joined
Apr 4, 2010
Messages
509
Like Dominion in League of Legends, only one team can capture at a time. Instead of having 'player one' and 'player two' adding points at the same time, you should have it so that only the unit that was there first should be adding points, then anyone who want's to challenge the first player will have to make him get out of range of the pedestal. This way you only need one "Pedestal Point" variable.
 
Level 6
Joined
Nov 3, 2005
Messages
103
I mean in Dominion it's done way simpler, since only the hero can do it and it's a channeling timer. My map has pads that units stand on, sort of like getting mercs in Heroes, except I want it to work for multiple teams.
 
Level 10
Joined
Apr 4, 2010
Messages
509
I made a little test map. Hit the horses to control their movement. I don't know what conditions you want, I made it so that once you own the pedestal, you cannot gain points there anymore. There is no subtracting mechanic, I'll add it later if you want.
 

Attachments

  • Pedestals.w3x
    19 KB · Views: 34
Status
Not open for further replies.
Top