• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[ASM & Hex✓] Teleport Item

Asith

Uwao
237
Posts
3
Years
    • Seen today
    Cutting to the chase, I want to make a key item that teleports the player to a certain map when used. So far it seems that tools like LSA's complete item editor are capable of adding custom field effects via ASM. I don't mind having to learn ASM just to do this, but could someone please direct me to where I would even start with a script like that? ASM seems to be primarily used for things like mathematical functions, not something as external as teleporting the player somewhere. Some help would really be appreciated.
    Heck, if there's a way to make an item that teleports the player without using ASM that would be even better haha

    Edit: Just to add, what I essentially need is an escape rope that can be used from anywhere (infinite times) and always teleports to the same place. I don't mind having to overwrite the existing escape rope item to do this! Another way of putting it is an item version of the field move "Teleport"
     
    Last edited:
    853
    Posts
    3
    Years
    • Seen Nov 9, 2023
    I probably can't do much here but I'm gonna try and return the favor. So most key items are actually more flag triggered events than items.

    So first thing I'd say look into the flag that gives the bike, and how that behavior is defined.

    If you're on third gen, maybe it would be a good idea to use advance map to write an warp script that would warp you where you want this item to go, and save the script somewhere.

    My guess is, if you can find a free flag, you can define it to work like a key item, at that point its down to giving it a behavior, which should be where that script comes in. If you write the script to activate warp when the flag is set, and on end clear that same flag, that should make it reusable.

    Briefly you should probably use a check flag, an if statement that goes to end if the flag isn't set, and if it is set, lock activate warp, clearflag release and then end.

    Then when you have your item mocked up, just make it's behavior to set the flag and everything should activate.
    Good luck, and thanks again for helping me.
     

    Asith

    Uwao
    237
    Posts
    3
    Years
    • Seen today
    I probably can't do much here but I'm gonna try and return the favor. So most key items are actually more flag triggered events than items.

    So first thing I'd say look into the flag that gives the bike, and how that behavior is defined.

    If you're on third gen, maybe it would be a good idea to use advance map to write an warp script that would warp you where you want this item to go, and save the script somewhere.

    My guess is, if you can find a free flag, you can define it to work like a key item, at that point its down to giving it a behavior, which should be where that script comes in. If you write the script to activate warp when the flag is set, and on end clear that same flag, that should make it reusable.

    Briefly you should probably use a check flag, an if statement that goes to end if the flag isn't set, and if it is set, lock activate warp, clearflag release and then end.

    Then when you have your item mocked up, just make it's behavior to set the flag and everything should activate.
    Good luck, and thanks again for helping me.

    Using a flag and warp script would definitely be the function I'm looking for, but unless I'm misunderstanding, the activation of said script could only happen in the overworld, yes? What I'm having trouble with is allowing the player to activate this script from their bag, by pressing "use" on the item. Do you know of a way to get a script connected to the "use" button of an item that I've overlooked?

    Thanks!
     
    853
    Posts
    3
    Years
    • Seen Nov 9, 2023
    Using a flag and warp script would definitely be the function I'm looking for, but unless I'm misunderstanding, the activation of said script could only happen in the overworld, yes? What I'm having trouble with is allowing the player to activate this script from their bag, by pressing "use" on the item. Do you know of a way to get a script connected to the "use" button of an item that I've overlooked?

    Thanks!

    gotcha I'm saying that's how it should work, you go into the key items menu or register it, then when you use it, it should auto activate.

    The theory is sound but I don't know enough about the process to give complete instruction on it. That's why you should check out how the bike works.

    If you know how the "use bike" works, then that should tell you where you have to put the script that would set the flag to activate the warp.
    So to clarify, if it works how think you'd need to scripts, one to create the function with the check flag & clear flag, and the second to actually set the flag and activate it attached to the item use.
     
    853
    Posts
    3
    Years
    • Seen Nov 9, 2023
    Using a flag and warp script would definitely be the function I'm looking for, but unless I'm misunderstanding, the activation of said script could only happen in the overworld, yes? What I'm having trouble with is allowing the player to activate this script from their bag, by pressing "use" on the item. Do you know of a way to get a script connected to the "use" button of an item that I've overlooked?

    Thanks!

    Hey just got LSA editor and check out the part under usage, add use of select script!
    That's it that's all you need right there.

    So find a flag to use, write the first script with check flag if statement lock player warp release and clear flag end.

    Compile that and put it into the game

    Then right the second script that would activate that one, the one that would set the flag the other one checks for, copy the offset it uses, compile it.
    Then use that offset for your new items usage script. :)
     

    Asith

    Uwao
    237
    Posts
    3
    Years
    • Seen today
    Hey just got LSA editor and check out the part under usage, add use of select script!
    That's it that's all you need right there.

    So find a flag to use, write the first script with check flag if statement lock player warp release and clear flag end.

    Compile that and put it into the game

    Then right the second script that would activate that one, the one that would set the flag the other one checks for, copy the offset it uses, compile it.
    Then use that offset for your new items usage script. :)

    Oh my, that use of select script seems to be working perfecly! I didn't realise there was such a simple solution haha. Thanks very much for the help!
     
    Back
    Top