One map for multiple Level Numbers.
#1
Posted 08 July 2013 - 02:03 PM
So it would be mighty convenient to only need to collect a single map to show the entire tower.
So yeah, this is a strange one. I don't think it can really be done with an item script. A single script would either have to assume the level numbers to toggle the map for are all adjacent to one another, or would only be able to accommodate fewer than 9 level numbers. Plus, an item script would be hard-coded to the item itself.
So what I was thinking would be a better idea would be an FFC script that, upon collecting the map item (Item #21 by default I believe.) it would give the player the map item for every Level Number specified in its D0->D7 values.
The benefit of doing it this way is that you can have two scripts on the same screen with different values in their D slots. So with only two FFCs running the same script, you could get 16 floors mapped out with a single map. Pretty neat.
------------------
So first it would check to see if item (#21) is collected or not. When it is, it goes through all the D values, setting Game->LItems[const int LI_MAP] to 1.
It's quite the useful script, I'd wager.
#2
Posted 08 July 2013 - 02:28 PM
reading your post, i had a cool idea, but its divergent of what you want to do...
since each floor is a different level number, you could have a collectible map item for each floor. gaining individual maps for the same shape 3x3 tower floor might not be so necessary, but for other multifloor dungeons it could be cool. especially if combined with your script idea, have a couple different maps located through the dungeon that give you multiple floors at a time.
#3
Posted 08 July 2013 - 03:37 PM
#4
Posted 08 July 2013 - 03:52 PM
#5
Posted 08 July 2013 - 03:54 PM
It's okay if all the D slots are used, though. Two of the same FFC scripts with different D values probably wouldn't interfere with each other, would they?
#6
Posted 08 July 2013 - 04:13 PM
#7
Posted 08 July 2013 - 06:46 PM
Completely Untested.
item script MultiMap {
void run() {
if (Screen->D[0] != 0) {Game->LItems[Screen->D[0]] |= LI_MAP;}
if (Screen->D[1] != 0) {Game->LItems[Screen->D[1]] |= LI_MAP;}
if (Screen->D[2] != 0) {Game->LItems[Screen->D[2]] |= LI_MAP;}
if (Screen->D[3] != 0) {Game->LItems[Screen->D[3]] |= LI_MAP;}
if (Screen->D[4] != 0) {Game->LItems[Screen->D[4]] |= LI_MAP;}
if (Screen->D[5] != 0) {Game->LItems[Screen->D[5]] |= LI_MAP;}
if (Screen->D[6] != 0) {Game->LItems[Screen->D[6]] |= LI_MAP;}
if (Screen->D[7] != 0) {Game->LItems[Screen->D[7]] |= LI_MAP;}}}
Put it as a pickup script for a custom item, set the D values of the screen the map is on to what levels you want to get the map for.
Edit: Oh wait, you can't set those in the editor. Hold on a minute...
ffc script SetD {
void run (d0, d1, d2, d3, d4, d5, d6, d7) {
Screen->D[0] = d0;
Screen->D[1] = d1;
Screen->D[2] = d2;
Screen->D[3] = d3;
Screen->D[4] = d4;
Screen->D[5] = d5;
Screen->D[6] = d6;
Screen->D[7] = d7;}}
You could probably get away without using the Screen D by checking for a specific FFC, but this is probably the simplest .
Edited by grayswandir, 08 July 2013 - 06:52 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users

