Nifflas' Support Forum

Level Editing Support => Knytt Stories Level Editing Support => Topic started by: utherdoul on May 25, 2009, 14:04:38

Title: Specific warp / flag question
Post by: utherdoul on May 25, 2009, 14:04:38
 Hi all.

I've managed to avoid most warp and flag use in my level-making, but it's got to the stage where I think I need to use them. This is what I want to do:

Imagine I'm at 'main area 1' (1000x1000).
Enter a building (1000x1001). (easy shift work)
Shift to different interior (1000x1002) and get Item Run with the flag. (no problem)
Leave the house to get to 'main area 1' (1000x1000). (easy peasy)
Walk off-screen to go to 'main area 2' (999x1000).
Return to 'main area 1' (1000x1000).
Enter the building to reach a NEW building interior with no Flag Item shift (say, 1000x1003). (HOW?!)

Does that make sense? Basically I want to make it so I can only enter a screen amongst a line of screens on the same y-axis if I haven't got Item Run. Otherwise, I'd like to skip that screen and get to a different screen where the building shift destination will take Juni to a building interior screen without the item shift.

Now, I could do this by copying my y-axis screens, but that'd be a lot of work, as they all connect quite intricately with each other (interconnecting shifts, etc) and I don't really want to do that. Surely there's an easier way with flags / warps? I watched Bass' videos on flags and warps and they were the most basic things I can already do with them. I know they have more functionality, but I can't seem to harness it.

Anyone care to make any suggestions?
Title: Re: Specific warp / flag question
Post by: LPChip on May 25, 2009, 18:15:29
On room 999x1000 add a warp that makes you warp to another screen that looks identical to the main area 1000x1000. It will be a copy of that screen, except that there's a different shift to move you to another screen.
Title: Re: Specific warp / flag question
Post by: AA on May 25, 2009, 21:20:11
If I understood it correctly, A) you want a player without Run to access a building with the Run Power Up, and a player with Run to access a different building, and B) make it so that it doesn't disrupt the rest of your level.

You can achieve A without flags, as LPChip suggested, but keep in mind that once the Warp to the alternate room is taken you cannot go back to the original one through the same way. Achieving B really depends on the layout of your level, and on the point mentioned above.

Putting a Flag-Warp at room x1000y1000 should do the trick as well: either test the Run Power Up Flag or the flag you set in the room with the Power Up. This way you could still get back to the original room if somewhere along the way the flag is reset.
Title: Re: Specific warp / flag question
Post by: utherdoul on May 26, 2009, 06:50:27
LP - your solution is what I'd tried, but as AA said, I need to get back to the original screens.

How exactly do I set a Flag warp? It seems that I can either set a flag OR a warp... I don't fully understand how to use the complex parts of it, and all the tutorials seem to focus on the more basic side of things...
Title: Re: Specific warp / flag question
Post by: Purple Pineapple on May 26, 2009, 07:00:49
Let's see...

Move [x999y1000] to [x999y1003]
Place Flag Warp A at [x999y1003]
Palce Warp at [x1000y1000]

[x1000y1000]
WarpY(L)=3
[x999y1003]
Flag(A)=Power0
FlagWarpY(A)=-3

Think that should do it.
Title: Re: Specific warp / flag question
Post by: utherdoul on May 26, 2009, 14:22:23
I'll give that a go. Thanks :^^:
Title: Re: Specific warp / flag question
Post by: LPChip on May 26, 2009, 14:58:27
If you need to go back, you can archieve that too.

Make a copy of screen x999y1000 too and make it warp to the original screen. Like you move in a Z pattern.

x1000y1000 -> move left -> X999y1000
x999y1000 -> warp right -> x1000y1010
x1000y1010 -> move left -> x999y1010
x999y1010 -> warp right -> x1000y1000

Screen x999y1000 and x999y1010 would look the same, except for the warp coordinates.
screen x1000y1000 and x1000y1010 would also look the same, but with a different shifter.
Title: Re: Specific warp / flag question
Post by: utherdoul on May 27, 2009, 16:46:50
Marvellous!

Thank you LP Chip and Purple Pineapple - I kind of combined your suggestions and played around a bit myself and I've done it (whilst learning a lot about warps and flag warps in the process)!

Problem solved and it feels great to see it in action! Thanks! The level in question is Fissure (http://nifflas.ni2.se/forum/index.php?topic=119.0) in case you're interested.

Feel free to lock this now.
Title: Re: Specific warp / flag question
Post by: LPChip on May 28, 2009, 11:50:16
Glad we could help. :)

Locking is not something we do here. Others might have additional questions to this topic. :)
Title: Re: Specific warp / flag question
Post by: AhhCobras on June 27, 2009, 23:22:39
Since it was left open, I'll post my problem here rather than start a new thread. The problem I'm having is getting my warps to react to flags. I have a flag activated by a cutscene, then a warp from that room. In the editor, the warp works fine if I test starting in that room, but if I start from the shift/cutscene, it throws me to a different screen. Another warp that should bring me back to the post-cutscene room seems to not work at all.

BTW, I have watched the tutorial videos, read the editor guide, looked through other warp-related posts, and messed around with it as much as I could. Also, I saw the thing about the negative Y bug, but I have gotten that to work and I don't really want to mess with the world settings unless that's the only way.
Title: Re: Specific warp / flag question
Post by: AA on June 28, 2009, 22:03:31
^ Let's see... I understand that the cutscene Shift moves the player to the room where a Flag Warp is present, is that right? If so, I remember such a setup won't work.
Title: Re: Specific warp / flag question
Post by: AhhCobras on June 29, 2009, 01:52:07
Well, the thing that's weird is, the warp in the room the cutscene moves you to doesn't have a flag. Or do you mean it automatically puts a flag on it? It's a whole different room that has a flag warp, but I can't even get there because this warp won't work after the cutscene  >(.

I may have to give in and just let the cutscene be played over if the shift is activated again, it seems to complicated for some reason.
Title: Re: Specific warp / flag question
Post by: LPChip on June 30, 2009, 17:20:41
did you set the save option for your cutscene? You must save or it will respawn in the last screen before the cutscene was played.
Title: Re: Specific warp / flag question
Post by: utherdoul on July 01, 2009, 13:51:40
It's actually surprisingly hard to visualise what your problem is without actually tinkering with it. Let me see if I understand correctly:

When you start from the cutscene target room:

When you start from a different room (i.e. playing normally):

Anyway, whether I've fully got it or not, remember that warps have to work like this:

[Room 1a]    [Room 2a]
                   
[Room 1b]    [Room 2b]

Room 1a has a WARP RIGHT with the co-ordinates of Room 2b
Room 2b has a cutscene shift which turns flag x on and puts you in Room 2a
Room 2a has a FLAG x WARP with the co-ordinates of Room 1b

Now this is as far as my memory serves (and I'm not home to test it), so MASSIVE apologies if this isn't accurate. Rest assured, it sounds like your problem is very similar to my original problem and is solveable (no matter how difficult it might seem). All I can suggest is to keep playing around with it and maybe look at my hypothetical shift / warp issue above - the answers to that led me in the right direction to fixing it.

I had a strong desire to write a decent (complete) warp tutorial once I'd fixed my problem, because it seems the more detailed / complicated aspects of warps aren't covered in anything that's out there right now. Maybe I should (once I'ce confirmed my facts!)
Title: Re: Specific warp / flag question
Post by: AhhCobras on July 04, 2009, 12:42:56
@LP, yes, the save thing was my first hurdle X-P. Luckily there are a few posts about cutscene problems I was able to check.

@uther, I think that's pretty close to what I'm trying to do.

The only difference is, the cutscene shift works fine (it drops me in the target room like it should)
The diagram sort-of thing there is almost just what I'm trying to do. In more detail it's like this

[ 1 ] - [ 2 ]  =room 1 is the shift/scene room, 2 is just the entrance to it and contains the flagged warp

[empty] - [ 3 ] = room 3 is a copy of room 2 w/o the shift, this is simply so the cutscene and save are not repeatable. It also contains a normal, i.e. non-flagged warp back to room 2.

So the real thing is, I haven't even tested the flag warp, because I can't reach that room (2) with a flag activated. The normal warp from room 3 will work only when I start there, not when I have used the shift/cutscene to get there. So, if that's not even more confusing, congratulations! you deserve a medal for ultra-comprehension!  :hiddenstar: Seriously, thanks for attempting to ungarble this mess. I'm gonna see what I can do with it, and then just move on to finishing up some other parts of the level. Thanks guys!
Title: Re: Specific warp / flag question
Post by: utherdoul on July 04, 2009, 17:07:42
Why, thank you, and you're welcome.

Good luck with it!
Title: Re: Specific warp / flag question
Post by: AA on July 04, 2009, 18:57:57
@LP, yes, the save thing was my first hurdle X-P. Luckily there are a few posts about cutscene problems I was able to check.

@uther, I think that's pretty close to what I'm trying to do.

The only difference is, the cutscene shift works fine (it drops me in the target room like it should)
The diagram sort-of thing there is almost just what I'm trying to do. In more detail it's like this

[ 1 ] - [ 2 ]  =room 1 is the shift/scene room, 2 is just the entrance to it and contains the flagged warp

[empty] - [ 3 ] = room 3 is a copy of room 2 w/o the shift, this is simply so the cutscene and save are not repeatable. It also contains a normal, i.e. non-flagged warp back to room 2.

So the real thing is, I haven't even tested the flag warp, because I can't reach that room (2) with a flag activated. The normal warp from room 3 will work only when I start there, not when I have used the shift/cutscene to get there. So, if that's not even more confusing, congratulations! you deserve a medal for ultra-comprehension!  :hiddenstar: Seriously, thanks for attempting to ungarble this mess. I'm gonna see what I can do with it, and then just move on to finishing up some other parts of the level. Thanks guys!

You say the normal Warp in room 3 leads to room 2,and you also say room 2 contains a Flag Warp. So let's say we're in room 3 and we take the Warp (in whatever direction it is) from room 3 to room 2: if the Flag the Warp in room 2 depends on is off, we should end up in room 2; if the Flag is on, then we should end up in whatever room the Flag Warp in room 2 leads to. Is this what happens? If not, could you please clarify this?

Alternatively, if you could describe what you do when playing normally (like utherdoul did with Warp Right, Flag Warp etc.) it would help; if the issue is just making a non-repeatable cutscene, I think there was a guide for that, but I don't remember where.
Title: Re: Specific warp / flag question
Post by: AhhCobras on July 05, 2009, 02:24:47
Maybe I'm just not using the warp correctly? I looked at a couple other levels, and was pretty sure this is how it works. But is this correct:
-A flag warp will only activate if the flag is set, otherwise the room scrolls regularly
-only the direction you want to warp from will matter, in other words, say the room has exits on top, left and right. The warp should activate for the right exit, so you don't have to set anything for the up, and left warps.

Regarding AA's post:
I tried to set the numbers the way the map is actually laid out. So rooms 1 and 2 are next to each other, room 3 is right under 2, and under 1 is another part of the map. You would enter originally from 2 and proceed to 1 (the flag warp in 2 should not yet be active), once activating the shift you end up in 3. 3 is the same room as 2, just the shift tile is removed this way if you try to activate the cutscene again, nothing will happen. Upon leaving 3, you should shift upwards to 2, now with a flag active. If you so choose to move from 2 to 1, the warp should send you down to 3 ( so the shift tile cannot be activated again) and the warp from 3 should send you back up to 2, essentially cutting 1 out entirely. So, you should play like this;
[1] - [2]   
[e] - [3]
 *enter [2], walk left to [1]*  *activate cutscene [1] and shift to [3]*  *from [3] warp right Y-1 (normal) [2]* *from [2] either, shift out normally through door, or warp left Y+1 (flagged)* Then 2 and 3 should be connected as if they were 1 and 2.
Title: Re: Specific warp / flag question
Post by: AA on July 05, 2009, 12:07:31
I think the problem lies in the way Flag Warps work: unlike normal Warps, which are triggered when you leave the room, Flag Warps are triggered when you enter the room (from any direction). So the Flag Warp should probably be in room 1; although there could be other ways you could arrange things, depending on the other elements, like the Shift door you mention in room 2.
Title: Re: Specific warp / flag question
Post by: AhhCobras on July 05, 2009, 14:58:57
That I did not know, still it's the unflagged warp that's giving me trouble. In any case I just went ahead and made a copy of the room 2 and stuck it next to 3. If I can figure it out in the future I might come back and mess around with it a little, but apparently they just don't like me.  :sad:
But it's not worth  obsessing over, I've got lots more of this level to put together. Thanks for all the help though  :^^:
Title: Re: Specific warp / flag question
Post by: Purple Pineapple on July 05, 2009, 16:06:18
I can think of 3 possible problems:
Flag warps work when you enter the room.
Flags activate on shifts
Flag warps don't warp on a shift.

I still don't understand the problem, btw.