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

Structure Attack

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Are you trying to imitate the fountain in DotA ?

Well, basically that fountain is a normal structure that has Life/Mana Regenaration Aura, that's all.

Such as Ziggurat and others, they are structures as well, but they can attack, only the addition is the ability of Life/Mana Regen.

Also, you can take default units and just change their model into fountain, easy enough.
 
Level 4
Joined
Apr 11, 2012
Messages
66
Are you trying to imitate the fountain in DotA ?

Well, basically that fountain is a normal structure that has Life/Mana Regenaration Aura, that's all.

Such as Ziggurat and others, they are structures as well, but they can attack, only the addition is the ability of Life/Mana Regen.

Also, you can take default units and just change their model into fountain, easy enough.

thanks sir

do you know how can i make an trigger that when i type a message my unit will teleport into an secret place ?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You have to set where is your secret place first and use this trigger;
  • Melee Initialization
    • Events
      • Player - Player 1 (Red) types a chat message containing -go as A substring
    • Conditions
    • Actions
      • Set udg_YourLocation = (Center of (Playable map area))
      • Unit - Move WhatIsYourUnit instantly to YourLocation
      • Custom script: call RemoveLocation(udg_YourLocation)
 
Level 4
Joined
Apr 11, 2012
Messages
66
You have to set where is your secret place first and use this trigger;
  • Melee Initialization
    • Events
      • Player - Player 1 (Red) types a chat message containing -go as A substring
    • Conditions
    • Actions
      • Set udg_YourLocation = (Center of (Playable map area))
      • Unit - Move WhatIsYourUnit instantly to YourLocation
      • Custom script: call RemoveLocation(udg_YourLocation)

do i need to make an new variable ?
how can i make that variable ?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Go to Trigger Editor and press CTRL + B
Create a new variable name YourLocation (or whatever name you like as long it means something valuable to what you are setting it)
After you has name the variable, select the Variable Type as Point (location in other words)

After that, just follow trigger above.

Good luck :)

You can also not use a variable, but it will leave a leak in your game

Learn more about leaks: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/?highlight=leaks
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
In this case, no need.

And also, the location I set in the trigger is just an example.

You should create a Region (using Regions Palette) and set the location according to the region (your Secret Place)

  • Melee Initialization
    • Events
      • Player - Player 1 (Red) types a chat message containing -go as A substring
    • Conditions
    • Actions
      • Set udg_YourLocation = (Center of Region 0000 <gen>)
      • Unit - Move YourUnit instantly to YourLocation
      • Custom script: call RemoveLocation(udg_YourLocation)
 
Level 4
Joined
Apr 11, 2012
Messages
66
In this case, no need.

And also, the location I set in the trigger is just an example.

You should create a Region (using Regions Palette) and set the location according to the region (your Secret Place)

  • Melee Initialization
    • Events
      • Player - Player 1 (Red) types a chat message containing -go as A substring
    • Conditions
    • Actions
      • Set udg_YourLocation = (Center of Region 0000 <gen>)
      • Unit - Move YourUnit instantly to YourLocation
      • Custom script: call RemoveLocation(udg_YourLocation)

already done with that trigger but when i typed -go different hero will respawn and i cant controll it
 
Status
Not open for further replies.
Top