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

Multiple questions [Waygates&units]

Status
Not open for further replies.
Level 5
Joined
May 10, 2009
Messages
88
Do waygates use regions for teleporting upon unit movement? For example, if I click on a different part of the map and not the waygate, how do I get it to make the unit use the waygate without me clicking on it?

Visibility across the map:
How? Do I make the map a region/rect and emit a visibility modifier on it? This isn't working, can someone give me an example please?

Unit attack speed:
what is the max speed a unit can have before it starts to have delay between attacks? Like on the old angel arena maps, some units attack faster than others with the same agility

Error message & sound:
What are the offsets for the error message on a spell? Like when you try to cast an ability, it pops up the error message right above the unit statboard that says "You must wait to cast this ability." How do I make a text message event that puts my message right there? I guess I just need the Y offset, as the x will vary with the message...

Unit speed max:
Gameplay constant?

Thanks in advance, +rep for helpful and/or explanaation on why/why not.
 
Level 3
Joined
Apr 29, 2009
Messages
42
Visibility across the map:
How? Do I make the map a region/rect and emit a visibility modifier on it? This isn't working, can someone give me an example please?

Under the Tool Pallette you will find the option Region Pallate, create a region and then make this trigger:
  • Region
  • Events
    • Depens on when you want the visibility to be added
  • Conditions
  • Actions
    • Visibility - Create an initially Enabled visibility modifier for <Player X/Or whatever event you're using> emitting Visibility across <Your_Region>
Unit speed max:
Gameplay constant?

Yes, Advanced > Gameplay Constants > Movement - Unit Speed - Maximum / Minimum
max is 522 and minimum is 1, unless you shift+click then you can set whatever value you want (not sure if any higher or lower value works though).
 
Level 5
Joined
May 10, 2009
Messages
88
Thanks a bunch, +repped.

Still need an answer to these:

Do waygates use regions for teleporting upon unit movement? For example, if I click on a different part of the map and not the waygate, how do I get it to make the unit use the waygate without me clicking on it?

Unit attack speed:
what is the max speed a unit can have before it starts to have delay between attacks? Like on the old angel arena maps, some units attack faster than others with the same agility
 

Deleted member 177737

D

Deleted member 177737

Do waygates use regions for teleporting upon unit movement? For example, if I click on a different part of the map and not the waygate, how do I get it to make the unit use the waygate without me clicking on it?

Visibility across the map:
How? Do I make the map a region/rect and emit a visibility modifier on it? This isn't working, can someone give me an example please?

Unit attack speed:
what is the max speed a unit can have before it starts to have delay between attacks? Like on the old angel arena maps, some units attack faster than others with the same agility

Error message & sound:
What are the offsets for the error message on a spell? Like when you try to cast an ability, it pops up the error message right above the unit statboard that says "You must wait to cast this ability." How do I make a text message event that puts my message right there? I guess I just need the Y offset, as the x will vary with the message...

Unit speed max:
Gameplay constant?

Thanks in advance, +rep for helpful and/or explanaation on why/why not.

No, waygates just teleport to other waygates. Unless you do some sort of trigger to make it teleport you somewhere else.

Make an invisible un-selectable dummy unit with whatever the visibility you want on it. Then just place it where you want.

Make a trigger that detects something and then make floating text appear above the unit's head. (That's about the best you can do to my knowledge.)
 
Level 5
Joined
May 10, 2009
Messages
88
How do you do this... it won't let me select a unit on the waygate, just a region...
 
Level 11
Joined
Dec 5, 2009
Messages
846
Make a trigger that detects something and then make floating text appear above the unit's head. (That's about the best you can do to my knowledge.)

I wouldn't use that.

Also, floating texts are special. There can not be more than 100 text tags at the same time in a map. So what ever you do, you will never leak more than 100 text tag but if you reach this limit, you won't be able to create a new text tag either.
If I remember well, the 100th text tag you create has an handle id of 0, so it is safer to use only 99 of them (for hashtables, for example).

....
 

Deleted member 177737

D

Deleted member 177737

How do you do this... it won't let me select a unit on the waygate, just a region...

1.) Make a new waygate unit without the waygate ability.
2.) Place the waygate and a region the same size underneath the waygate.
3.) Place another waygate with a region.
4.) Set up triggers so when a unit walks into the region it's teleported to the other region.

It's not that hard, also as an alternative to using regions just make is to when unit comes within say 50 feet of the waygate's center it is teleported to another waygate.
 
Level 5
Joined
May 10, 2009
Messages
88
1.) Make a new waygate unit without the waygate ability.
2.) Place the waygate and a region the same size underneath the waygate.
3.) Place another waygate with a region.
4.) Set up triggers so when a unit walks into the region it's teleported to the other region.

It's not that hard, also as an alternative to using regions just make is to when unit comes within say 50 feet of the waygate's center it is teleported to another waygate.

But what I am talking about, is when...lets make this an even better explanation.

You are in an enclosed area. Waygate is in the bottom right corner that teleports to top left corner. When I click on the top left corner area, I need the unit to use the bottom right waygate by himself, without me telling him to use it.
 

Deleted member 177737

D

Deleted member 177737

But what I am talking about, is when...lets make this an even better explanation.

You are in an enclosed area. Waygate is in the bottom right corner that teleports to top left corner. When I click on the top left corner area, I need the unit to use the bottom right waygate by himself, without me telling him to use it.

Ask pharoh about doing that with triggers.
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
But what I am talking about, is when...lets make this an even better explanation.

You are in an enclosed area. Waygate is in the bottom right corner that teleports to top left corner. When I click on the top left corner area, I need the unit to use the bottom right waygate by himself, without me telling him to use it.

if you create the waygates at map ini wc3 will probably find that out and include that into the pathing map as long as it is the shortest way

if it is longer you are screwed and have to think of some badass workaround
(like getting all issued orders of every unit, checking there position, ordering them to choose a new path etc.)
 
Since you pm'd me, here are some things you need to consider:
• Waygate ability will teleport the unit, only if the surrounding area is enclosed and there is no way out. You see, most games work with an engine, which will detect if there are free ways around, so that the unit will move towards the point it was ordered to. Waygate ability is the exact result of this method: it works whenever there are no free ways to reach the point.

Example map: View attachment Default Waygate I.w3x

• To achieve a custom waygate teleportation system, you will need triggers, what Yayoi suggested. You need to a) check if the unit that's ordered is in the area you want to take the "waygate-order" from, b) if the point of issued order is indeed in the region that you want your waygate to teleport units to and c) if the unit is not already in the region that you want it teleported by the waygate ability, so that it doesn't get teleported in the upper region, even if it's already in it.

Test map: View attachment Custom Waygate II.w3x

Triggers:
  • Waygate Custom I
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Set Points[1] = (Target point of issued order)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Region to be Teleported <gen> contains Points[1]) Equal to True
          • (Region to be Teleported <gen> contains (Triggering unit)) Equal to False
          • (Region can only teleport from <gen> contains (Triggering unit)) Equal to True
        • Then - Actions
          • Unit - Order (Triggering unit) to Right-Click Way Gate 0000 <gen>
        • Else - Actions
      • Custom script: call RemoveLocation (udg_Points[1])
  • Region Teleport
    • Events
      • Unit - A unit enters Waygate <gen>
    • Conditions
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Set Points[2] = (Center of Region to be Teleported <gen>)
      • Custom script: call SetUnitX (u, GetLocationX(udg_Points[2]))
      • Custom script: call SetUnitY (u, GetLocationY(udg_Points[2]))
      • Custom script: if GetUnitCurrentOrder(u) == 851971 then
      • Custom script: call IssueImmediateOrder (u, "stop")
      • Custom script: endif
      • Custom script: call RemoveLocation (udg_Points[2])
      • Custom script: set u = null
Note: The trigger will stop the unit from moving, upon teleportation, unless it had a different order than "smart".
 
Level 5
Joined
May 10, 2009
Messages
88
Since you pm'd me, here are some things you need to consider:
• Waygate ability will teleport the unit, only if the surrounding area is enclosed and there is no way out. You see, most games work with an engine, which will detect if there are free ways around, so that the unit will move towards the point it was ordered to. Waygate ability is the exact result of this method: it works whenever there are no free ways to reach the point.

Example map: View attachment 87501

• To achieve a custom waygate teleportation system, you will need triggers, what Yayoi suggested. You need to a) check if the unit that's ordered is in the area you want to take the "waygate-order" from, b) if the point of issued order is indeed in the region that you want your waygate to teleport units to and c) if the unit is not already in the region that you want it teleported by the waygate ability, so that it doesn't get teleported in the upper region, even if it's already in it.

Test map: View attachment 87502

Triggers:
  • Waygate Custom I
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Set Points[1] = (Target point of issued order)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Region to be Teleported <gen> contains Points[1]) Equal to True
          • (Region to be Teleported <gen> contains (Triggering unit)) Equal to False
          • (Region can only teleport from <gen> contains (Triggering unit)) Equal to True
        • Then - Actions
          • Unit - Order (Triggering unit) to Right-Click Way Gate 0000 <gen>
        • Else - Actions
      • Custom script: call RemoveLocation (udg_Points[1])
  • Region Teleport
    • Events
      • Unit - A unit enters Waygate <gen>
    • Conditions
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Set Points[2] = (Center of Region to be Teleported <gen>)
      • Custom script: call SetUnitX (u, GetLocationX(udg_Points[2]))
      • Custom script: call SetUnitY (u, GetLocationY(udg_Points[2]))
      • Custom script: if GetUnitCurrentOrder(u) == 851971 then
      • Custom script: call IssueImmediateOrder (u, "stop")
      • Custom script: endif
      • Custom script: call RemoveLocation (udg_Points[2])
      • Custom script: set u = null
Note: The trigger will stop the unit from moving, upon teleportation, unless it had a different order than "smart".

This...Totally and completely makes sense, and I love you for the reply!! +rep to you and to others who tried to help along the way ^^
 
Status
Not open for further replies.
Top