Multiple "screen" warps in one "screen"?

  • 4 Replies
  • 2815 Views
*

Offline Headgrinder

  • 901
  • 35
  • Smart Steel Polisher
    • View Profile
    • www.matthewepperson.wordpress.com
Multiple "screen" warps in one "screen"?
« on: March 18, 2010, 12:15:24 »
Hey, I've looked around real quick and haven't seen this addressed in a way that I get.

I'm new to trying to do warps and I've not seen any really good descriptions differentiating between shift style warps and screen warps (the ones that use the 4 arrows in a box... are they what the ks_editor_tut calls "shifters?"  I really can't figure it out what the tutorial is talking about...).  I found the layout of the Knytt stories manager a little confusing or unintuitive as well, so I'm really hoping someone can help.  There just doesn't seem to be an over all description that includes all the elements: objects, layout of the manager screen, AND world.ini stuff.  Without the overall view, I get lost real quick.  :\

Anyhow, I was going to have 3 "switches" throughout my level you have to find which trigger a series of screen warps to a similar looking screen.  In each one, a flag check would (or would not) be triggered sending you to the next screen, which would send you to the next, kind of like a series of if-than statements in some program languages. 

However, it isn't working.  I'm gathering that you have to move from screen to screen to initiate these flags, and thus they cannot be stacked like that in a single series of like screens.

Is that right or am I missing something?

Also, I've had to revert to editing the world.ini because I CANNOT figure out which settings go with screen warps and flags.  I don't know what I'm missing, but nothing seems to be working except for seeing what is going on in other world.ini files and figuring it out from there. 

Thanks guys.

*

Offline LPChip

  • You can only truly help other people by allowing them to fail.
  • 3510
  • 138
  • Excel at the thing you're the best at!
    • View Profile
    • LPChip Interactive
Re: Multiple "screen" warps in one "screen"?
« Reply #1 on: March 18, 2010, 13:00:08 »
The different between shifts and a warp is that a warp (4 arrows) will teleport you when you exit a screen from one or more of the sides.

You are talking about switches so you're probably want to use shifts.

More info about shifts can be found in the [faq], which will refer to this topic: http://nifflas.ni2.se/forum/index.php?topic=20.0.
on the left, above my avatar.

MODPlug Central Forum
"If I tried to kill you, I'd end up with a big fat hole through my laptop." - Chironex

*

Offline AA

  • 510
  • 23
  • Was ITA84
    • View Profile
    • Insight on Videogames
Re: Multiple "screen" warps in one "screen"?
« Reply #2 on: March 18, 2010, 13:41:56 »
If I got it right, your objective would be to check multiple flags and, depending on their values, send the player to different locations, all in a single transition (via multiple Shifts). This may be impossible, if I remember correctly, because I recall the game has some problems in triggering Flag Warps when the player enters a screen via a Shift.

Let's say you have a switch (a Shift object) that, when activated, sends the player to another screen: in theory, if there's a Flag check in that screen, the player may or may not get warped to an alternative screen depending on the success of said check. This is with a single Flag, yet it might not work for the reason I stated above. However, if it works, you may chain these screens with other Shift/Flag-check screens to create further branches (a series of if-then-else statements).

Other lever makers have used a variation on that, but I'm not sure if it could work for you: basically, they don't use Shifts, but let the player fall through a series of screens with Flag Checks. This always works, but it might not suit everyone's level design. You could make the player fall through screens while covered by a Custom Object foreground, but here we're getting to really complicated stuff.

About World.ini editing, ask me anything: I've never used the Manager because I find it quicker to copy/paste the text file.

Code: [Select]
; Flag check example
; If Flag 1 is on, move 5 screens to the right
[x1000y1000]
Flag(A)=1
FlagWarpX(A)=5

; Flag toggle example
; Shift A turns Flag 1 on
[x1000y1000]
ShiftFlagOn(A)=1
Videogames are for everyone, by everyone

*

Offline egomassive

  • 1852
  • 250
    • View Profile
    • egomassive games
Re: Multiple "screen" warps in one "screen"?
« Reply #3 on: March 18, 2010, 13:55:39 »
I made you a visual aid. I will describe the logic for each room and why it's there. While I was making this other people replied, but I'll post mine anyway. Firstly, shifting and warping do not interfere with Flag Checks. Only Flag Warps prevent Flag Checks.

Code: [Select]
[x1001y1000]
ShiftYMap(A)=1
Pushing down in front of the hut will send you one screen down. This is called a Shift.

Code: [Select]
[x1001y1001]
Flag(A)=Power3
FlagWarpY(A)=1
WarpY(L)=-1
This room checks for the High Jump Power-up. If you have that ability you will move one screen down. This is called a Flag Warp. If you don't have that ability you will stay put. The Warp Object (orange square) is present on the screen in case you exit the room to the left. The last line of code works in combination with the Warp Object to send you up one screen if you exit to the left. Flag Warps have no relation to the Warp Object.

Code: [Select]
[x1001y1002]
ShiftYMap(A)=1
ShiftTouch(A)=True
You cannot perform Flag Checks after entering a room due to a Flag Warp. To get around this limitation. I've added a Shift Object that shifts on touch. It sends Juni down one screen.

Code: [Select]
[x1001y1003]
Flag(A)=Power0
FlagWarpY(A)=1
WarpY(L)=-3
This room checks for the Run Power-up. If Juni has it she goes down one screen. Again the Warp Object and warp code are needed in case Juni exits to the left.

Code: [Select]
[x1001y1004]
WarpY(L)=-4
Again the Warp Object and warp code are needed in case Juni exits to the left.

This is not an elegant way to check for multiple flags, but it is simple to construct. I hope this helps. As for the Manager not working. The most common problem is having a path name that's too long. My Manager is in C:\Program Files\Knytt Stories\3rd Party Tools\KSManager on XP.
(Tileset by Adelene)

*

Offline Headgrinder

  • 901
  • 35
  • Smart Steel Polisher
    • View Profile
    • www.matthewepperson.wordpress.com
Re: Multiple "screen" warps in one "screen"?
« Reply #4 on: March 19, 2010, 12:41:51 »
Hey, thank you all.  I think the single greatest revelation was that the warp object has nothing to do with flag warps.  So flag warps have no object, they are simply the code in the world.ini?  Secondly, that the game can't do a flag check after a flag warp. 

I've changed the level so that there are 3 rooms in a row with "gates."  So, it looks like what I will have to do is after each flag warp, I'll have to send Juni to a false room that automatically shifts her to the next flag check room and then, if the switch has been thrown, that will flag warp her to the next false room and so on.  Is that as clear as mud?

Oh wait, but you (egomassive) are also apparently not using blank screens with warps objects in them to send Juni back to previous areas.  Ahhhh.... I was using flag warps in blank rooms like in James Vaughan's fun with cutscenes.  So I don't need to do that, I can just put a warp object...  oh crap, just figured something else out tooooooooooo!  So the left, right, up and down of the warp object warp directions refers to the side of the screen Juni touches!  Holy cow, I feel dumb.  I was under the impression that for some bizarre reason you had to tell the game which direction you wanted the warp to take you, even though you are already specifying xy coordinates.  Holy jumping cattle crap.  Yet something else that I didn't see explained anywhere, but I suppose should have been painfully obvious. 

Man, I've read many posts, the pdf tutorial, and looked at two tutorial levels and all of this is only now clicking.  Oh well.

Ooooook.  Thank you all so much.  The dumb noob will retreat to the level editor now.  %)

ps, maybe I'll have to write my own tutorial some day so that guys as dense as me can understand what's real.  Thanks again.