#Really long distance travel
1 messages · Page 1 of 1 (latest)
and here's the internal sailing action too for good measure
Is there a way to teleport player to specific coordinates on the target island?
The way I imagine it working would be as follows:
when you place it for the first time it has a "key" inside that points to this gate coordinates
you need to place that kay in the second gate for you to achieve one way travel
if you swap keys of 2 gates you achieve 2 way travel
alternatively I could try mc waystone approach with gates connecting to any other gate.
can I just launch both one after the other? Something like
TeleportToIsland(coords)
TeleportToPlace(coords)
}```
or do I first need to wait for player to arrive at the specific island and then tp him to specific spot?
yeah, sounds likely
but there should be some "player arrived" event fired so I can use that
next question: items have this setData, getData,removeData. is there anything like that for the entire save?
it doesn't look like saveData or saveDataGlobal have these
You need to save that data with the mod.savedata stuff unfortunately
Sorry, I know that system is kinda terrible
#wayward message crafting ingredients
I decided to not go with key approach
too much hassle
instead I will do something more basic
Travel action on doodad will open UI with the list of all possible travel destinations
those will be saved in the player
hmm, is there a way to get data from some far off island?
game.islands can do it
so...
it would be cool if player travelled by walking into the gate
so doodad could just have "change address" action
anyway, I will have to check if target portal exists multiple times through the process
UI for the target address picker could be simple list with "Island name - portal name"
in case of missing portal just "island name - missing portal" in red
chiri - is there any better way of checking if specific doodad exists on specific island than filtering island.doodads?
if player will have more than a few teleporters it will add a lot of overhead from just filtering things
how do I add action now?
you're missing a (
so this is the correct way?
I mean I don't see anything else here that wouldn't work
I had another question, but I guess I can just dismantle DebugTools 🙂
I was wondering if I should use actions or usableActions
If a player is going to use the action via actions context menus or the action bar, it must have a UsableAction
If the action does things that affect the game state for all players, the code that does that must be within an Action handler
Almost all Actions have a UsableAction counterpart and vice versa
UsableAction with no Action is the least common, because it means the thing acts like the other actions that affect the world, but in actuality it just messes with your own personal UI. Action with no UsableAction is a bit more common because Actions can be executed by other UI code if you like
hmm this seems complex, but maybe it explains weirdness here #1379222876636446840 message
I had weird issue with actions and usable actions in that topic
I didn't really understand the thread when I saw it and I've been very busy so I didn't say anything
It probably is some kind of fundamental misunderstanding with how UsableActions and Actions work
And maybe even registrations
I'm not sure exactly
I just wanted to switch all "pin" from action to usableAction
but going back on track.
would it be possible to display that teleportation UI when the player walks into the gate?
not from the actions but from the "walking finished" event for that specific player?
I would want you to explain me how do these work in greater detail so that I understand how I messed up in PinItem mod, but not today