![]() |
Saving information in one tag - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Saving information in one tag (/Thread-Saving-information-in-one-tag) |
Saving information in one tag - Alaric - 07-11-2013 05:04 AM I would like to remove/forbid the recall spell and use teleports like in Elder Scroll IV: Oblivion. But I'm not sure, how to save it. My idea is to set "tag.teleport" on a player and every entrance to a dungeon would be represented with something (that's what I need help with). I thought, by letters from A to Z - the whole alphabet. As the player enters the region of the entrance to a dungeon the trigger on=@enter fires and checks whether the player's tag.teleport contains the letter. The main portal will be in a town. As the player goes thought the world, he/she finds the entrances etc. and in the moment he/she finds it, he/she can teleport from the town to the dungeon. The problem is, the alphabet has only 26 chars, it means only 26 possible teleports. Don't you know a similar trick with numbers, or something like that? For example 1.dungeon represents number 1, 2.dung number 2. If the tag is 0 => the player hasn't found neither the first dung nor the second. If the tag is 1 => the player has found the first one. If the tag is 2 => found only the second one. If its 3 => found both. Hope you understand what I mean. RE: Saving information in one tag - darksun84 - 07-11-2013 05:28 AM Yea you can store one or more bitmask in a tag, bitmask can hold up to 32 different values so with just three you can store up to 96 different location. Example with 3 bitmask stored in a tag : First, it's better you organize your dungeon locations bitmask values inside a defname. 3 bitmask -> 3 defnames PHP Code: [DEFNAME dungeon_group_1] same thing for 2nd bitmaks and bitmask PHP Code: [DEFNAME dungeon_group_2] When a your player will enter in a dungeon area you will have to do the check/set of the bitmask. PHP Code: //In dungeon g1_dung_2 Well it looks weird and i didn't test it, but it should works theorically ! Also the check function will need some restyling. Best way will be to use just @RegionEnter trigger and storing the dungeon bitmask value in a tag contained in the areadef of the dungeon entrace. Or you can use LIST for handling all of this crap ![]() |