Teleport Tile

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
User avatar
Golbeeze
Posts: 441
Joined: November 13th, 2007, 3:18 am

Teleport Tile

Post by Golbeeze »

Does the {TELEPORT_TILE} macro work in 1.4? I can't seem to get it to function. Is there an easy way to make a tile teleport units landing on it to another tile?
My_Own_Minion: get rid of the scientist, i can take the blind guy

Talkative: You're like the Wizard of Oz, but evil.

Add-ons in 1.8: Golbeeze's Maps, Golbeeze's RPGs, Evolving Era
Contributor to and Maintainer of Mercenaries
User avatar
Ken_Oh
Moderator Emeritus
Posts: 2178
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Re: Teleport Tile

Post by Ken_Oh »

What do you think it's supposed to do? If you think it's placed on a tile and then teleports any unit it that moves to that tile to point B, then you're mistaken. What it does is simply teleports a unit from point A to point B.

To make a tile that works as a teleporter, you want to use a moveto event that has teleport inside of it (TELEPORT_TILE would fit in there).
User avatar
Golbeeze
Posts: 441
Joined: November 13th, 2007, 3:18 am

Re: Teleport Tile

Post by Golbeeze »

Excellent, thanks! :D
My_Own_Minion: get rid of the scientist, i can take the blind guy

Talkative: You're like the Wizard of Oz, but evil.

Add-ons in 1.8: Golbeeze's Maps, Golbeeze's RPGs, Evolving Era
Contributor to and Maintainer of Mercenaries
Stoner
Posts: 9
Joined: October 6th, 2008, 6:41 pm

Re: Teleport Tile

Post by Stoner »

I wrote a map and added alot of teleporting tiles.It works but theres so much lag its not worth playing.I tried moveing the teleport code to another file but the problem persists.

[event]
name=moveto
first_time_only=no
{SET_LABEL_PERSISTANT 19 1 (_ "1A")}
{TELEPORT_TILE 19 1 5 5}
{SET_LABEL_PERSISTANT 19 2 (_ "2A")}
{TELEPORT_TILE 19 2 55 56}
{SET_LABEL_PERSISTANT 20 2 (_ "3A")}
{TELEPORT_TILE 20 2 55 5}
{SET_LABEL_PERSISTANT 22 7 (_ "4A")}
{TELEPORT_TILE 22 7 5 56}
{SET_LABEL_PERSISTANT 22 8 (_ "cen")}
{TELEPORT_TILE 22 8 30 30}
{SET_LABEL_PERSISTANT 23 9 (_ "4B")}
{TELEPORT_TILE 23 9 16 47}
{SET_LABEL_PERSISTANT 25 13 (_ "3B")}
{TELEPORT_TILE 25 13 44 13}
{SET_LABEL_PERSISTANT 25 14 (_ "2B")}
{TELEPORT_TILE 25 14 44 47}
{SET_LABEL_PERSISTANT 26 14 (_ "1B")}
{TELEPORT_TILE 26 14 16 13}
[/event]

this is 1/8 of total. is there a way to clean it up so it works faster? I tried eliminateing labels.That didn`t help.
User avatar
Golbeeze
Posts: 441
Joined: November 13th, 2007, 3:18 am

Re: Teleport Tile

Post by Golbeeze »

If you have my Teleportation add-on, you can open up the map and look at what I did.

I have :

[event]
name=prestart
{SET_LABEL_PERSISTANT 16 19 (_ "Teleport Tiles")}
{SET_LABEL_PERSISTANT 3 2 (_ "13, 11")}
{SET_LABEL_PERSISTANT 5 2 (_ "15, 11")}
...etc
[/event]

[event]
name=moveto
first_time_only=no
{TELEPORT_TILE 3 2 13 11}
{TELEPORT_TILE 5 2 15 11}
...etc.
[/event]

And it works well. Failing that, try using :nosaves in-game.
My_Own_Minion: get rid of the scientist, i can take the blind guy

Talkative: You're like the Wizard of Oz, but evil.

Add-ons in 1.8: Golbeeze's Maps, Golbeeze's RPGs, Evolving Era
Contributor to and Maintainer of Mercenaries
Stoner
Posts: 9
Joined: October 6th, 2008, 6:41 pm

Re: Teleport Tile

Post by Stoner »

72 tiles is just way too many ... i did find a solution i belive ... havent tested fully , but partial test worked.

[event]
name=turn refresh
first_time_only=no
[message]
speaker=narrator
image=spacenoth-icon.png
caption="Worm Hole"
message= _ "
"
[option]
message= _ "@Activate destination 1A"
[command]
{TELEPORT_TILE 19 1 5 5}
{TELEPORT_TILE 1 22 5 5}
{TELEPORT_TILE 52 37 5 5}
{TELEPORT_TILE 38 53 5 5}
{TELEPORT_TILE 40 2 5 5}
{TELEPORT_TILE 57 22 5 5}
{TELEPORT_TILE 19 59 5 5}
{TELEPORT_TILE 2 39 5 5}
[/command]
[/option]

[option]
message= _ "@Activate destination 1B"
[command]

a choice at start of turn that allows which destination a player wants to activate.the above worked,but its only 1 of 9 ... i belive the whole string will work as well.I`ll edit this when finished.
Marty
Posts: 9
Joined: November 1st, 2008, 10:48 pm

Re: Teleport Tile

Post by Marty »

hello wen i did commands
{TELEPORT_TILE 6 3 7 4} and etc.
after that i go to see it rly works but it shows me error:
Map is not a retitangle
wat to do? :(
User avatar
Golbeeze
Posts: 441
Joined: November 13th, 2007, 3:18 am

Re: Teleport Tile

Post by Golbeeze »

Is it in an event tag? Please copy + paste what you have here.
My_Own_Minion: get rid of the scientist, i can take the blind guy

Talkative: You're like the Wizard of Oz, but evil.

Add-ons in 1.8: Golbeeze's Maps, Golbeeze's RPGs, Evolving Era
Contributor to and Maintainer of Mercenaries
User avatar
Ken_Oh
Moderator Emeritus
Posts: 2178
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Re: Teleport Tile

Post by Ken_Oh »

Marty wrote:hello wen i did commands
{TELEPORT_TILE 6 3 7 4} and etc.
after that i go to see it rly works but it shows me error:
Map is not a retitangle
wat to do? :(
You map isn't a rectangle. The problem is in your map and not the teleport tile macro.
Marty
Posts: 9
Joined: November 1st, 2008, 10:48 pm

Re: Teleport Tile

Post by Marty »

one prob i have linux and i need to edit it from MC
ok
border_size=1
usage=map

_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , Khr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , Gg , Ch , Ggf , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , Gg , Gg^Fet , Gg , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , Gg^Fet , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , Gg , Ch , Gg , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , Ggf , Khr , Gg , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr
_off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr , _off^_usr

[event]
name=moveto
first_time_only=no
{TELEPORT_TILE 6 9 5 13}
{TELEPORT_TILE 6 11 7 8}
[/event]

so thats wat going on
plz help :(
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Teleport Tile

Post by zookeeper »

I don't know what to say.
Marty
Posts: 9
Joined: November 1st, 2008, 10:48 pm

Re: Teleport Tile

Post by Marty »

and
it is rectangle 2 rectangle but it dont gives me promision to editor AND game
Marty
Posts: 9
Joined: November 1st, 2008, 10:48 pm

Re: Teleport Tile

Post by Marty »

Stoner wrote:I wrote a map and added alot of teleporting tiles.It works but theres so much lag its not worth playing.I tried moveing the teleport code to another file but the problem persists.

[event]
name=moveto
first_time_only=no
{SET_LABEL_PERSISTANT 19 1 (_ "1A")}
{TELEPORT_TILE 19 1 5 5}
{SET_LABEL_PERSISTANT 19 2 (_ "2A")}
{TELEPORT_TILE 19 2 55 56}
{SET_LABEL_PERSISTANT 20 2 (_ "3A")}
{TELEPORT_TILE 20 2 55 5}
{SET_LABEL_PERSISTANT 22 7 (_ "4A")}
{TELEPORT_TILE 22 7 5 56}
{SET_LABEL_PERSISTANT 22 8 (_ "cen")}
{TELEPORT_TILE 22 8 30 30}
{SET_LABEL_PERSISTANT 23 9 (_ "4B")}
{TELEPORT_TILE 23 9 16 47}
{SET_LABEL_PERSISTANT 25 13 (_ "3B")}
{TELEPORT_TILE 25 13 44 13}
{SET_LABEL_PERSISTANT 25 14 (_ "2B")}
{TELEPORT_TILE 25 14 44 47}
{SET_LABEL_PERSISTANT 26 14 (_ "1B")}
{TELEPORT_TILE 26 14 16 13}
[/event]

this is 1/8 of total. is there a way to clean it up so it works faster? I tried eliminateing labels.That didn`t help.
persistant cmd is wen ur labels will restart wen u clear it
User avatar
Golbeeze
Posts: 441
Joined: November 13th, 2007, 3:18 am

Re: Teleport Tile

Post by Golbeeze »

Will you take a screenshot of the map in the editor and post it? I want to see it.
My_Own_Minion: get rid of the scientist, i can take the blind guy

Talkative: You're like the Wizard of Oz, but evil.

Add-ons in 1.8: Golbeeze's Maps, Golbeeze's RPGs, Evolving Era
Contributor to and Maintainer of Mercenaries
Marty
Posts: 9
Joined: November 1st, 2008, 10:48 pm

Re: Teleport Tile

Post by Marty »

sorry i cant go to map it says its not a valid map

u can copy the map things and try by ur self
:|
Post Reply