Teleport with out rect

Moridin

Snow Leopard
Reaction score
144
If by rect you mean the region people place within it to use with the event "Unit - A unit enters region" then yes, I'm pretty sure you can.

You could use a condition to check the distance between the point at the center of the circle of power and any nearby units. If it's close enough (on top of the circle of power) then teleport.
If you could elaborate as to why you don't want to use rects, I'm sure we can help you a little better :).
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
well, of course there is a way, there are plenty i guess but the question is if you really need them.
basically you can use whatever condition to trigger the teleportation and use whatever location to teleport to.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
can't he just give the circle that Waypoint ability (or is there any)?

I'm not sure how Waypoints work though

EDIT: yeah the Waygate w/e
 

Moridin

Snow Leopard
Reaction score
144
@Dinowc:

I think you meant the waygate ability. They work as links from one spot to another via pathing. So if you order a unit to move somewhere far away, it will take a shorter route via a waygate rather than walk a longer route.
 

Azylaminaz

Vox Populi
Reaction score
91
Stick to waygates as units instinctively use them as shorter paths.

To set the waygate to a point instead of a region, simply use a trigger.

I couldn't find the GUI calls, but the JASS natives exist.
Trigger:
  • Custom script: call WaygateSetDestination(<your unit>, x, y)

<your unit> being the unit... A variable declared in GUI (the normal way) would start with udg_ and all spaces would be replaced with _'s.

x and y are locations (real, meaning they need a decimal if you use the standard editor).
Example:
Trigger:
  • Custom script: call WaygateSetDestination(udg_myUnit, 712., -6123)



Edit:
There is also the BJ function WaygateSetDestinationLocBJ which takes in a unit and location.
Trigger:
  • Custom script: call WaygateSetDestinationLocBJ(udg_myUnit, udg_myLoc)
 

Lmfaocj

Active Member
Reaction score
1
If you could elaborate as to why you don't want to use rects, I'm sure we can help you a little better :).

I don't want to use rects because if they don't click on the circle they will still just teleport.

I made something like this
Trigger:
  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Target unit of issued order) Equal to (==) Circle of Power 0023 &lt;gen&gt;
    • Then - Actions
      • Wait until (((Triggering unit) is in (Units within 50.00 of (Position of Circle of Power 0023 &lt;gen&gt;))) Equal to (==) True), checking every 0.10 seconds
      • Unit - Move (Triggering unit) instantly to (Position of Circle of Power 0024 &lt;gen&gt;)
    • Else - Actions

but it leeks or what ever because if you click on "Circle of Power 0024 <gen>" then click on "Circle of Power 0023 <gen>" it will teleport you right back.
 

Inflicted

Currently inactive
Reaction score
63
oh. i think i understand, he wants you to have to click on the TP'er before it actually moves the units.

i presume then u only have one unit/hero then?

just make sumthn like

Trigger:
  • events
    • Player - player selects &quot;Circle of Power&quot;
    • conditions
    • (hero[Player Number of Triggering Player] is alive) equal to true
    • (hero[Player number of Triggering Player] is within 512 range of &quot;Circle of Power&quot;) equal to true
      • or something like that..
    • actions
    • Unit - move hero[Player Number of Triggering Hero] to &quot;region**&quot;
    • move camera etc.


just set your hero to an unit array, and this should work, if i understood you correctly.
 

Moridin

Snow Leopard
Reaction score
144
@Noob GamerMkrR:

That won't work, right clicking a circle of power isn't selecting it.

Try this event and condition(s):

Trigger:
  • Trigger
    • Events
      • Unit - A unit is issued an order targeting a unit - Generic unit event
    • Conditions
      • (Issued order Equal to (order(smart)) -&gt; Order comparison I think.
      • Unit-type of (Target unit of (issued order)) Equal to Circle of Power -&gt; Unit-type comparison
    • Actions
      • Wait till unit gets close (either using a periodic or a condition wait)
      • ------------------Tele actions after this (or in your periodic check trigger) -----------------------
 

Jedi

New Member
Reaction score
63
That won't work too, unit might change his order.You need to use multiple triggers to track.

Just use rects, this is totaly useless for me.Every w3 players know if they enter a circle, they will move somewhere else.
 

Moridin

Snow Leopard
Reaction score
144
That won't work too, unit might change his order.You need to use multiple triggers to track.
It will work, you just need to add more conditions to the periodic part. The event to check if a unit clicks on is perfectly accurate (not in literal words, the trigger was freehand :p).

Actually, I can think of another solution. Use the waygate ability as mentioned by Dinowc. That creates a pathing link between two spots. If you right click the waygate, then the unit teleports, if you decide to move through the waygate's position, nothing happens*.

*Another thing that could happen is the unit teleports out on one end and in on the other end instantaneously.
 

Moridin

Snow Leopard
Reaction score
144
i know.
why not just tell players they have to left-click on the teleporter?
...because if you used that, you could use the teleporter from anywhere on the map, as long as you can select it....
 

Lmfaocj

Active Member
Reaction score
1
Thanks for your help every one, I guess I have no choice but to use it the way I made it...
 

Inflicted

Currently inactive
Reaction score
63
@ Moridin
...because if you used that, you could use the teleporter from anywhere on the map, as long as you can select it....

notice this: (hero[Player number of Triggering Player] is within 512 range of "Circle of Power") equal to true
?

yeah, if its an rpg. and u have one hero.. then you wouldnt have problems with clicking it on the other side of the map or watever..
 

Moridin

Snow Leopard
Reaction score
144
notice this: (hero[Player number of Triggering Player] is within 512 range of "Circle of Power") equal to true
?

yeah, if its an rpg. and u have one hero.. then you wouldnt have problems with clicking it on the other side of the map or watever..
My mistake :p. I didn't fully read your trigger.
 

Inflicted

Currently inactive
Reaction score
63
...because if you used that, you could use the teleporter from anywhere on the map, as long as you can select it....

nope. notice i made this:
"(hero[Player number of Triggering Player] is within 512 range of "Circle of Power") equal to true "
 

sentrywiz

New Member
Reaction score
25
Am I not getting this or thread lives on because people think complex ways?


Trigger:
  • Blablabla
    • Events
      • Unit - A unit comes within (Min(1.00, 25.00)) of Circle of Power 0006 &lt;gen&gt;
    • Conditions
    • Actions
      • Unit - Move (Triggering unit) instantly to (Position of Circle of Power 0005 &lt;gen&gt;)



This doesn't use region. It also doesn't require selecting. And if you want to stop the player from doing something else while you "animate" pause the unit then unpause it when it "teleports".


I still don't get it, why so many people on such easy trigger? :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top