Evil Warpgate

hopy

Active Member
Reaction score
64
I have 4 teleporters in my map. (Each corner) All 4 of them are supposed to be connected, and you choose your destination with a dialog.

I have chosen for this way because I prefer not to have a island or something with multiple teleporters on it that leed to other teleporters, and couldn't think of any other nice methode of having the ability to teleport without the use of abilitys that you can use at any time and any place.

Now the trigger looks like this: (see below)
What it's supposed to do is: create a dialog that allows you to choose a destination and activate a different trigger which will than move you there.
Trigger:
  • Teleporter SW
    • Events
      • Unit - A unit enters Waygate SouthWest <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) has buff [Teleporter] ) Equal to False
    • Actions
      • Dialog - Clear Teleporter[(Player number of (Owner of (Triggering unit)))]
      • Dialog - Change the title of Teleporter[(Player number of (Owner of (Triggering unit)))] to Teleport to
      • Dialog - Create a dialog button for Teleporter[(Player number of (Owner of (Triggering unit)))] labelled North West (Ice, Wi...
      • Set Teleport_North_West[(Player number of (Owner of (Triggering unit)))] = (Last created dialog Button)
      • Dialog - Create a dialog button for Teleporter[(Player number of (Owner of (Triggering unit)))] labelled North East (Dark, F...
      • Set Teleport_North_East[(Player number of (Owner of (Triggering unit)))] = (Last created dialog Button)
      • Dialog - Create a dialog button for Teleporter[(Player number of (Owner of (Triggering unit)))] labelled South East (Earth, ...
      • Set Teleport_South_East[(Player number of (Owner of (Triggering unit)))] = (Last created dialog Button)
      • Dialog - Create a dialog button for Teleporter[(Player number of (Owner of (Triggering unit)))] labelled Cancel
      • Set Teleport_Cancel[(Player number of (Owner of (Triggering unit)))] = (Last created dialog Button)
      • Dialog - Show Teleporter[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit))
      • Set Teleport_Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)

(This is one out of 4 triggers, all of them are almost the same only with different button names.)

Teleporter - Is a dialog variable with an array, size 6 for I have 6 players in my map.
Teleport_North_West, Teleport_North_East, Teleport_South_West and Teleport_South_East are Dialog button variables, again with an array of size 6

And the trigger that will move you to the chosen destination:
Trigger:
  • North West
    • Events
      • Dialog - A dialog button is clicked for Teleporter[1]
      • Dialog - A dialog button is clicked for Teleporter[2]
      • Dialog - A dialog button is clicked for Teleporter[3]
      • Dialog - A dialog button is clicked for Teleporter[4]
      • Dialog - A dialog button is clicked for Teleporter[5]
      • Dialog - A dialog button is clicked for Teleporter[6]
    • Conditions
      • (Clicked dialog button) Equal to Teleport_North_West[(Player number of (Triggering player))]
    • Actions
      • Set Teleport_Point = ((Center of Waygate NorthWest <gen>) offset by 150.00 towards 270.00 degrees)
      • Special Effect - Create a special effect at Teleport_Point using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
      • Set Teleport_Effect = (Last created special effect)
      • Set Selection = (Teleport_Hero[(Player number of (Triggering player))] is selected by (Triggering player))
      • Unit - Hide Teleport_Hero[(Player number of (Triggering player))]
      • Unit - Move Teleport_Hero[(Player number of (Triggering player))] instantly to Teleport_Point
      • Wait 0.10 game-time seconds
      • Unit - Order Teleport_Hero[(Player number of (Triggering player))] to Stop
      • Unit - Unhide Teleport_Hero[(Player number of (Triggering player))]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Selection Equal to True
        • Then - Actions
          • Selection - Add Teleport_Hero[(Player number of (Triggering player))] to selection for (Triggering player)
        • Else - Actions
          • Do nothing
      • Unit - Create 1 Dummy Unit for Neutral Hostile at Teleport_Point facing Default building facing degrees
      • Unit - Add Dizziness [Teleporter] to (Last created unit)
      • Unit - Order (Last created unit) to Undead Necromancer - Cripple Teleport_Hero[(Player number of (Triggering player))]
      • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • Custom script: call RemoveLocation (udg_Teleport_Point)
      • Special Effect - Destroy Teleport_Effect


Teleport_Point is a point variable.
Teleport_Effect is a special effect variable.
Selection is a Boolean variable.
That Dizziness ability is a custom slow ability that's supposed to ... slow units and prevent them from using the teleporter for 10 seconds. Didn't want people to get the dialog again right afther teleporting.

These triggers are supposed to be useable by every player, at the same time and even at the same place ... which I doubt will fit ...

The problem: I have tested it with 2 players, since I couldn't get anyone else to help me test it xD, and the trigger worked just fine for me (Player 1) but didn't show anything for the other person.

I'm unable to see a mestake in this trigger and I've been fighting with it for about a month now, even posted a short thing about it here befor.

+rep for anyone that finds the problem and tell me about it. :p
I would realy apriciate it, it's one of the last things I need to fix befor my map's finaly finished.

Thank you in advance, sorry for any spellings mestakes, english is not my main language. :p
Let me know if I need to explain anything more detailed or if something is unclear.
 

jig7c

Stop reading me...-statement
Reaction score
123
you triggers looks ok, although this leaks
Trigger:
  • Set Teleport_Point = ((Center of Waygate NorthWest <gen>) offset by 150.00 towards 270.00 degrees)


create 2 separate points, one for center of waygate, and other one to offset the previous point by 150...

also..

since only you can see it, are you the first one entering any of those regions?
it might just do for the first player who triggers that specific event...
 

hopy

Active Member
Reaction score
64
First of all I'm very sorry about the very late reply. I posted this the evening befor a short vacation, hoping to get a reply befor I went there but things didn't quite go by my plan and I wasn't able to check it.

Anyways, Thank you for pointing out that leak, seems that one sneaked in when I completely remade that trigger a while ago. :p

What happened during our tests was:
- Player 2 entered the warp gate and completely nothing happened.
- Player 1 entered the warp gate and it worked completely as it should.
- Player 2 entered the warp gate and completely nothing happened again.

Basicly, the trigger only works for player 1 and doesn't like the other players. I realy can't figure out why since each of the variables have an array for each player and both the events and conditions should've worked for everyone and not just player 1.

I'm also sure that the unit triggering it matched the conditions for both players, and we both used the same warpgate, thus triggering the same event. So what I'm guessing is that the Arrays somehow only work for player 1 and the (Player number of (owner of (triggering unit))) didn't work for player 2?
 

hopy

Active Member
Reaction score
64
BUMP

Been a while but still just need this one to finish my map for now. :p
 

sentrywiz

New Member
Reaction score
25
I found some of these spark my doubt. They might not help at all, but there might be something in here that will have you look at it twice.

Btw, I'm sleepy and your code :nuts: me

1) Can a triggering unit actually perfectly substitute entering unit?

Maybe it will work for player 1 (you) but maybe it will change for multiple instances of other units?

2) Do your friends get the chance to click the dialogs or dialogs don't show up at all for them? I think this one is important.

3) You sure your friends use heroes? :D

4)
Trigger:
  • Set Selection = (Teleport_Hero[(Player number of (Triggering player))] is selected by (Triggering player))
    • If - Conditions
    • Selection Equal to True


This appeals to me like, if you select the unit while in the teleport zone he will be "Beam me up Scotty!" and if its diselected, teleporter will go "Humph!" and not do anything. Its possible for your friends to have clicked the teleporter while their unit was going to the teleport thingie?

5) There are all of these player numbers. Isn't it easier to not bother with player numbers and just make IF ELSE with units?

All wrote might be a big load of crap. I'm sorry if I helped with absolutely nothing at all :3
 

Moridin

Snow Leopard
Reaction score
144
Notes:

1) Triggering Player is automatically (Owner of (Triggering unit))

2) Arrays in GUI start with index 0. You need the dialog array to have a size of 7.

3) Triggers leak.

4) This line doesn't make any sense: (second trigger end)

# Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
# If (All Conditions are True) then do (Then Actions) else do (Else Actions)
# Custom script: call RemoveLocation (udg_Teleport_Point)
# Special Effect - Destroy Teleport_Effect
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top