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

2 problems: way gates and something with AI

Status
Not open for further replies.
Level 1
Joined
Mar 3, 2012
Messages
2
Ok

First problem: I have 2 way gates. I have drawn the regions, and linked them together.
NOW: whenever i left click on it with a unit, the unit goes and reaches the way gate. once it reaches the way gate, it stops, turns around, and heads for the other region, instead of teleporting there.

Second problem: my map has several lanes of war. on a lane, units spawn in front of their base, and then are ordered to attack move to the other base. there are towers all across the lane, defending their bases. In front of the base, a hero and two incredibly powerful "bodyguard" units act as last defense.
However, in one of the lanes, whenever an enemy unit attacks one of their towers, the bodyguards run to defend that tower, and then head back. In that same lane, the enemy's bodyguards stay put, when their towers are attacked. In other lanes, the bodyguards stay put, as well

So how to I stop them from defending? I have already turned off all ai.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Ok

First problem: I have 2 way gates. I have drawn the regions, and linked them together.
NOW: whenever i left click on it with a unit, the unit goes and reaches the way gate. once it reaches the way gate, it stops, turns around, and heads for the other region, instead of teleporting there.

So you used this:
  • Unit - Order your_unit to Move To (Center of Rect 000 <gen>)
instead of this?:
  • Unit - Move your_unit instantly to (Center of Rect 000 <gen>)
Second problem: my map has several lanes of war. on a lane, units spawn in front of their base, and then are ordered to attack move to the other base. there are towers all across the lane, defending their bases. In front of the base, a hero and two incredibly powerful "bodyguard" units act as last defense.
However, in one of the lanes, whenever an enemy unit attacks one of their towers, the bodyguards run to defend that tower, and then head back. In that same lane, the enemy's bodyguards stay put, when their towers are attacked. In other lanes, the bodyguards stay put, as well

So how to I stop them from defending? I have already turned off all ai.

So only 1 lane is experiencing this problem? Are they different types of bodyguards? If not, then check if they are positioned on the same distance.
If not try decreasing the sight radius.
If they are of different types, simply check which options are on and which ones are off for the ones that do work in object editor...
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Ok, the 'bodyguards" problem is fixed.
But I am not using triggers for the waygates. I'm using the standard "warp to region" waygate ability.

Then excuse me for I did not know that this ability existed :p
Thank you now I know it does. I'll do some tests with it later on.

You might want to create the teleportation yourself by creating a small region in front of the way gate and one further away from it, then you would need 2 triggers to teleport the units. It's really simple and looks similar to this:

  • Teleport 1
    • Events
      • Unit - A unit enters Teleport 1 in <gen>
    • Conditions
    • Actions
      • Set TemporaryLocation = (Center of Teleport 2 out <gen>)
      • Unit - Move (Triggering unit) instantly to TemporaryLocation
      • Custom script: call RemoveLocation(udg_TemporaryLocation)
  • Teleport 2
    • Events
      • Unit - A unit enters Teleport 2 in <gen>
    • Conditions
    • Actions
      • Set TemporaryLocation = (Center of Teleport 1 out <gen>)
      • Unit - Move (Triggering unit) instantly to TemporaryLocation
      • Custom script: call RemoveLocation(udg_TemporaryLocation)
The custom script and TemporaryLocation is to remove a location leak which might eventually cause lag to appear.
Just to be safe...

I'll try to find out how the "waygate ability" works in the meanwhile.
 
Status
Not open for further replies.
Top