Warps |
|
An easy way to create tiles that warp mobs to another location. [More] |
To download this library for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://Forum_account.Warps##version=2 Emulator users, in the BYOND pager go to File | Open Location and enter this URL:byond://Forum_account.Warps##version=2 |
The library defines the /warp type which you can use to create warps. All you have to do is define a sub-type of /warp (ex: /warp/warp_01), open the map editor, and place the warp on two tiles. When you run the game, the player will be teleported from one tile to the other when they step on the warp.
The library is simple but can be used in more complex ways. It comes with five demos that show how to use it in different ways. The demos are:
Version HistoryVersion 2 (posted 02-14-2012)
|
LordAndrew: (Feb 16 2012, 9:45 am)
I tried that but it didn't work at first, but then I realized I already had a ..() going on for non-mobs, whoops. Thanks!
Forum_account: (Feb 14 2012, 2:57 pm)
You can override the warp's warp() proc to check the type of the object its warping:
warp LordAndrew: (Feb 14 2012, 1:27 pm)
Hrm. I have a door on top of one of my warps and when I open it, when it closes again it ends up getting warped. Not sure how to stop that.
LordAndrew: (Feb 14 2012, 12:06 pm)
The town's just one tile. The red tile in the first and last screenshots is a locked warp turf that is basically used to be where the red exit perimeter in the town sends the player.
e: The code you posted does exactly what I was doing but with a lot less effort. Thank you! Forum_account: (Feb 14 2012, 11:54 am)
Yep, you can easily handle that. I'm not sure what the red spot is on the first and last screenshots. Is the town shown as two tiles? Or is it just the blue tile?
warp The /warp/town_01/inside type only exists to be a target. We override its warp() proc to make it not do anything when we step on it. Placing three areas on the map is certainly easier than editing turf instances in the map editor =) |
Copyright © 2024 BYOND Software.
All rights reserved.