Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple vars/var values of the same mapscript to use a single script #52

Open
Jaizu opened this issue Jan 29, 2023 · 1 comment

Comments

@Jaizu
Copy link

Jaizu commented Jan 29, 2023

Would allow converting something like this:

    MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE [
        VAR_BIRCH_LAB_STATE, 2 {
            turnobject (OBJ_EVENT_ID_PLAYER, DIR_NORTH)
        }
        VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 1: LittlerootTown_ProfessorBirchsLab_EventScript_SetObjectPosForDexUpgrade
        VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2: LittlerootTown_ProfessorBirchsLab_EventScript_SetObjectPosForDexUpgrade
        }

Into this:

    MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE [
        VAR_BIRCH_LAB_STATE, 2 {
            turnobject (OBJ_EVENT_ID_PLAYER, DIR_NORTH)
        }
        VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 1,
        VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2
        {
            // Content of LittlerootTown_ProfessorBirchsLab_EventScript_SetObjectPosForDexUpgrade
        }
@huderlem
Copy link
Owner

I looked into this in the past, but I couldn't come up with a good syntax at the time. There was difficulty with using switch-case-like syntax due to ambiguity in the parsing logic. I'd still like to do this, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants