• 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.

Creating gates and Tech upgrades that affect all players.

Status
Not open for further replies.
Level 3
Joined
Feb 27, 2009
Messages
17
Hey guys, i needed help with my new map.

-First thing i wanted to be able to do was to create gates that a player can open/close. These gates would already be placed on the map so i don't care about building them, but what i wanted was for the player who controls them to be able to open/close them, but also to be able to buy tech upgrades for it, for more health, armor etc.

-And lastly, how would i go about making tech upgrades effect all players and comp controlled of the same team, not just the player.
 
Level 3
Joined
May 20, 2008
Messages
66
For the global tech, create the same tech to all players, then use a fake tech. When the fake tech is researched, use trigger to order all players to research that same tech.

For the gate thingy, I don't know if I can help yet, but may be you can "remove" collision size for opened gate, "return" collision size for closed gate. The rest is just like normal building.
 
Level 3
Joined
Feb 27, 2009
Messages
17
For the global tech, create the same tech to all players, then use a fake tech. When the fake tech is researched, use trigger to order all players to research that same tech.

For the gate thingy, I don't know if I can help yet, but may be you can "remove" collision size for opened gate, "return" collision size for closed gate. The rest is just like normal building.

Ok is there a way to make the Gate a building by just copy/paste or something? I've tried making a barracks and just changing the model and trying to fiddle with other stuff but the enemy just walks through most of the gate as if it were still a barracks and when they attack it they circle it, i want it to act exactly like a doodad gate but have it so the player owns it.

Also is there a way to make it so when the gate is destroyed, it does not dissapear after awhile? I tried Death Type and fiddling with that but whenever the gate is destroyed it all dissapears and leaves a giant hole in the walls.
 
Level 8
Joined
Nov 9, 2008
Messages
502
Ok is there a way to make the Gate a building by just copy/paste or something? I've tried making a barracks and just changing the model and trying to fiddle with other stuff but the enemy just walks through most of the gate as if it were still a barracks and when they attack it they circle it, i want it to act exactly like a doodad gate but have it so the player owns it.
You need to alter your custom barrack's pathing map. It's a field in the object editor for buildings and there is, in the destructibles section, all the gates.

Also is there a way to make it so when the gate is destroyed, it does not dissapear after awhile? I tried Death Type and fiddling with that but whenever the gate is destroyed it all dissapears and leaves a giant hole in the walls.
You could make an alternate gate that is unselectable and invulnerable and when the original gate dies remove it, add the new gate, make new gate play the death animation and turn off it's collision.
 
Level 3
Joined
Feb 27, 2009
Messages
17
You need to alter your custom barrack's pathing map. It's a field in the object editor for buildings and there is, in the destructibles section, all the gates.

Thanks so much, thats what i was missing, they're attacking it like a normal gate now. +reps


You could make an alternate gate that is unselectable and invulnerable and when the original gate dies remove it, add the new gate, make new gate play the death animation and turn off it's collision.

Im pretty new to this, so how would i go about getting this done?
 
Level 8
Joined
Nov 9, 2008
Messages
502
Make a copy of the gate you have made and give it the Locust ability.

Make this trigger:
  • Your Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to YOURGATE
    • Actions
      • Set APOINTVARIABLE = (Position of (Triggering unit))
      • Unit - Remove (Triggering unit) from the game
      • Unit - Create 1 YOURDEADGATE for (Owner of (Triggering unit)) at APOINTVARIABLE facing (Facing of (Triggering unit)) degrees
      • Animation - Play (Last created unit)'s death animation
      • Unit - Make (Last created unit) Invulnerable
      • Custom script: call RemoveLocation(udg_APOINTVARIABLE)
Feel free to ask if there is a problem. :thumbs_up:
 
Level 2
Joined
Mar 30, 2009
Messages
30
For opening and closing gates use

  • Destructible - Open (Your gate)
in editor its Destructible-Open/Close/Destroy Gate

Saithron, simple as that?

The Sorrow ;)
 
Status
Not open for further replies.
Top