I want to write a spell script that opens a portal. Basically, it creates the portal on the map for a limited time, and players can use it to teleport. I’m not 100% sure how to go about it. Perhaps an object type that when walked over, you teleport?
Teleport Spell Type
I made something like that for someone…Cant remember who anyway just base yourself on PlayerWarp sub and if you want portal to be drawed then it will be a little more complicated…Anyway this should not be hard if you are familiar with vb6
That doesn’t help me in even the slightest way imaginable. Obviously I’m going to use the PlayerWarp sub to teleport a player. That’s not the question I asked. I want a spell that creates a temporary “warp attribute” on the map. Obviously you can’t place a warp attribute and refresh the map every time somebody uses the spell, that’s just a horrible way to do it. That’s why I thought about making a special object, where if you walk over it, it teleports you.
Not sure as I haven’t done this, but you might be able to place the warp where the player is standing and then have the server loop keep the teleport there for x time and when the time is up get rid of it. Not sure if this helps at all.
You would get your target’s Direction, and then use PlayerWarp(targetx, targety - 1) or variants of that depending on your target’s direction.
Yes, but would I use the map warp attribute, or will I have to write a custom object? I know how to go about placing it infront of the player etc. etc. etc. I’m wondering what method to use for the object itself.
With a map attribute I would have to refresh the map, no?
You would just need to send a packet to every player stating there’s a warp here, along with it’s positions and then just add the tile to the client instead and just save the position on the server. cooldowns same thing, remove portal, send packet to clients to remove portal, and you’re done, no reason to directly save it to the map. just check on the server if the warp is still there and if so, warp them, this will prevent lag switches
I did it in a similar way, used my boss mechanics to show a animation, used directions ect to show them facing the “exit” of a portal and if they were in “spell range” (which I would set to 1 tile, AoE) they could choose where to teleport to set maps according to the spells level (greater = more locations). Didnt really finish it as EOO went down but generally speaking the teleporting worked basically how Skyward said. Any person in my party could access my portals too which made a new way to sell locations to people.