pkmnfrk
04-14-2009, 11:50 PM
Real simple snippet today, with debatable use, but here it is anyway:
//Gives link a key for level (CurLevel - 9)
item script LevelXKey {
void run() {
Game->LKeys[Game->GetCurLevel() - 9]++;
}
}
Basically, you assign this script to an item, and it gives you a key in the numbered level (X - 9). What is the purpose, you ask? Well, let me answer!
I came up with this to go with an idea for a quest I want to make. In this quest, there are seventeen main dungeons. There's Levels 1 - 9, which are as in an ordinary quest (Triforce pieces/Ganon/whatever), and then there's Levels A - H (numbered 10 - 17). These extra levels are actually prerequisites to competing the first eight dungeons. This is accomplished by sticking a locked door at the entrance to each dungeon.
I created an item of type "Triforce Pieces", gave it a "Cutscene" of 1, and this script, and suddenly I have an end of dungeon item that "unlocks" another dungeon!
The tl;dr version: If you give this script to a Triforce item, and put this item in levels 10 - 17, you can use it to unlock levels 1 - 8.
//Gives link a key for level (CurLevel - 9)
item script LevelXKey {
void run() {
Game->LKeys[Game->GetCurLevel() - 9]++;
}
}
Basically, you assign this script to an item, and it gives you a key in the numbered level (X - 9). What is the purpose, you ask? Well, let me answer!
I came up with this to go with an idea for a quest I want to make. In this quest, there are seventeen main dungeons. There's Levels 1 - 9, which are as in an ordinary quest (Triforce pieces/Ganon/whatever), and then there's Levels A - H (numbered 10 - 17). These extra levels are actually prerequisites to competing the first eight dungeons. This is accomplished by sticking a locked door at the entrance to each dungeon.
I created an item of type "Triforce Pieces", gave it a "Cutscene" of 1, and this script, and suddenly I have an end of dungeon item that "unlocks" another dungeon!
The tl;dr version: If you give this script to a Triforce item, and put this item in levels 10 - 17, you can use it to unlock levels 1 - 8.