Teleport By dialog problem

Status
Not open for further replies.
Level 2
Joined
Feb 9, 2014
Messages
10
I made a teleport by using dialog but the problem is work 1 single time so it teleport me where I want one time but when I press again didn't work ... Can someone help me to fix it please ?



  • george of chernang
    • Events
      • Unit - A unit enters Tel 1 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Dialog - Clear Dialog_box
      • Dialog - Change the title of Dialog_box to Where do you wanna ...
      • Dialog - Create a dialog button for Dialog_box labelled Clan Brutain
      • Set Dialog_button[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog_box labelled George of Chernang
      • Set Dialog_button[4] = (Last created dialog Button)
      • Dialog - Show Dialog_box for Player 1 (Red)
      • Dialog - Show Dialog_box for Player 2 (Blue)
      • Dialog - Show Dialog_box for Player 3 (Teal)
      • Dialog - Show Dialog_box for Player 4 (Purple)
      • Dialog - Show Dialog_box for Player 5 (Yellow)
      • Dialog - Show Dialog_box for Player 6 (Orange)
      • Dialog - Show Dialog_box for Player 7 (Green)
      • Dialog - Show Dialog_box for Player 8 (Pink)
      • Dialog - Show Dialog_box for Player 9 (Gray)
      • Dialog - Show Dialog_box for Player 10 (Light Blue)
      • Dialog - Show Dialog_box for Player 11 (Dark Green)
      • Dialog - Show Dialog_box for Player 12 (Brown)

  • george of chernang telep button
    • Events
      • Unit - A unit enters Tel 1 <gen>
      • Dialog - A dialog button is clicked for Dialog_box
    • Conditions
      • (Triggering unit) Equal to (Entering unit)
      • (Clicked dialog button) Equal to Dialog_button[4]
    • Actions
      • Unit - Move (Entering unit) instantly to (Center of George Chernang <gen>)
 
Last edited:
Level 12
Joined
Feb 22, 2010
Messages
1,115
So everything works except teleport part?When you try second time you see dialog and buttons correctly?

If yes then at first trigger, add to second trigger's dialog click event again.
Trigger - Add event
 
Level 25
Joined
May 11, 2007
Messages
4,650
That's because when you press the button, the trigger checks both the conditions.
Since "(Triggering unit) Equal to (Entering unit)" never happens when you press the button, the condition returns false.

Separate the triggers so you have one trigger for the unit enters region and one trigger for the button click. They can both trigger a final teleportation trigger if you want.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
That's because when you press the button, the trigger checks both the conditions.
Since "(Triggering unit) Equal to (Entering unit)" never happens when you press the button, the condition returns false.

Separate the triggers so you have one trigger for the unit enters region and one trigger for the button click. They can both trigger a final teleportation trigger if you want.

He said it doesn't work when he removed that codition too.
 
Level 2
Joined
Feb 9, 2014
Messages
10

  • george of chernang
    • Events
      • Unit - A unit enters Tel 1 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Dialog - Clear Dialog_box
      • Dialog - Change the title of Dialog_box to Where do you wanna ...
      • Dialog - Create a dialog button for Dialog_box labelled Clan Brutain
      • Set Dialog_button[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog_box labelled George of Chernang
      • Set Dialog_button[4] = (Last created dialog Button)
      • Dialog - Show Dialog_box for Player 1 (Red)
      • Dialog - Show Dialog_box for Player 2 (Blue)
      • Dialog - Show Dialog_box for Player 3 (Teal)
      • Dialog - Show Dialog_box for Player 4 (Purple)
      • Dialog - Show Dialog_box for Player 5 (Yellow)
      • Dialog - Show Dialog_box for Player 6 (Orange)
      • Dialog - Show Dialog_box for Player 7 (Green)
      • Dialog - Show Dialog_box for Player 8 (Pink)
      • Dialog - Show Dialog_box for Player 9 (Gray)
      • Dialog - Show Dialog_box for Player 10 (Light Blue)
      • Dialog - Show Dialog_box for Player 11 (Dark Green)
      • Dialog - Show Dialog_box for Player 12 (Brown)

  • george of chernang telep button
    • Events
      • Unit - A unit enters Tel 1 <gen>
      • Dialog - A dialog button is clicked for Dialog_box
    • Conditions
      • (Triggering unit) Equal to (Entering unit)
      • (Clicked dialog button) Equal to Dialog_button[4]
    • Actions
      • Unit - Move (Entering unit) instantly to (Center of George Chernang <gen>)
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Yeah ofc this trigger won't work because there is no (Trigger Unit) with dialog click event.You need to store player's hero inside a variable and use

  • Unit - move UnitVariable(player number of (triggering player))
Also remove the first condition about triggering unit equals to entering unit.
 
Level 2
Joined
Feb 9, 2014
Messages
10
mate I am really so nooby :(( I don't know how to make this UnitVariable(player number of (triggering player)) ... what kind of variabile I must create or how to to that ?
 
Status
Not open for further replies.
Top