Forum Logo Welcome, Guest. Please login or register.
Did you miss your activation email?
May 22, 2018, 03:19:22 | See new unread posts
Home Help Search Arcade Chat Login Register

nifflas.ni2.se  |  Nifflas' Support Forum  |  Level Editing Support  |  Knytt Stories Level Editing Support  |  Topic: A Warp requiring three Flags... « previous next »
Pages: [1] Print
Author Topic: A Warp requiring three Flags...  (Read 1456 times)
Fubaka
Global Moderator


Total My honestly gotten stars: 75
Offline Offline


We are the music makers.


View Profile WWW
« on: April 20, 2016, 11:51:28 »

So in my upcoming level, I need a warp that functions only if three Flags are all set on. I've been storming about trying to find a solution to this problem, but nothing has worked so far.

My last strategy was to have three separate screens, each warping to the next if the right flag was set, but that didn't work. Only the first one triggered.

Anyone have any ideas?

Note: I do have a fallback plan if this can't be made to work, but it'd be a bit of extra work to implement.
« Last Edit: April 20, 2016, 11:54:51 by Fubaka » Logged

Great music doesn't force you to think; it allows you to.


Finished Levels:
sergiocornaga
Beta Tester


Total My honestly gotten stars: 129
Offline Offline





View Profile WWW
« Reply #1 on: April 20, 2016, 12:10:57 »

It would be a lot easier to have a warp that only doesn't function if three flags are all set off, so I'd recommend that approach. Or is that already your fallback plan?

Example below just in case my wording isn't clear.

Code:
FlagWarpX(A)=1
FlagWarpX(B)=1
FlagWarpX(C)=1
Flag(A)=0
Flag(B)=1
Flag(C)=2
Logged
Vegetal Gibber


Total My honestly gotten stars: 138
Offline Offline


Sorry excuse for a game designer


View Profile WWW
« Reply #2 on: April 20, 2016, 13:15:50 »

If you're using KS+, there's a feature called "Flag All" that does exactly what you need. Just select "Flag All" in the level editor, set it to "True" (last option in the list) and set up the X-Y warp below. Then set Flags A, B and C to whatever you want.

Here's a World.ini code example:

Code:
[x1000y1000]
Flag(All)=True       ; Needed for this to work
Flag(A)=Power0    ; Choose the first flag
Flag(B)=Power1    ; 2nd flag
Flag(C)=Power2    ; 3rd flag
FlagWarpY(All)=-3 ; Warp 3 screens up if the player has the Run, Climb and Dbl-Jump powers.
Logged

Some KS levels by me:
Fubaka
Global Moderator


Total My honestly gotten stars: 75
Offline Offline


We are the music makers.


View Profile WWW
« Reply #3 on: April 20, 2016, 18:30:04 »

It would be a lot easier to have a warp that only doesn't function if three flags are all set off, so I'd recommend that approach. Or is that already your fallback plan?

Example below just in case my wording isn't clear.

Code:
FlagWarpX(A)=1
FlagWarpX(B)=1
FlagWarpX(C)=1
Flag(A)=0
Flag(B)=1
Flag(C)=2

That is indeed my fallback plan. I will need to rearrange a lot of flag warps to make it work though. I suppose that's just what I'll have to do, since this is not a KS+ level.

Thanks for the support, guys.
Logged

Great music doesn't force you to think; it allows you to.


Finished Levels:
egomassive


Total My honestly gotten stars: 232
Offline Offline



View Profile WWW
« Reply #4 on: April 20, 2016, 22:07:24 »

A long long time ago before the existence of KS+ I made 2 demo levels for someone wanting to open a door only when three switches were activated.
One Door, Three Switches
1 Door, 3 Switches, 2 Realities
They use the same kind of logic seen in Shipwrecked. There are notes inside explaining how they work.

I must say though, that I like Sergio's idea. It is much more elegant.
« Last Edit: April 20, 2016, 22:11:02 by egomassive » Logged
Fubaka
Global Moderator


Total My honestly gotten stars: 75
Offline Offline


We are the music makers.


View Profile WWW
« Reply #5 on: April 20, 2016, 23:13:01 »

A long long time ago before the existence of KS+ I made 2 demo levels for someone wanting to open a door only when three switches were activated.
One Door, Three Switches
1 Door, 3 Switches, 2 Realities
They use the same kind of logic seen in Shipwrecked. There are notes inside explaining how they work.

I must say though, that I like Sergio's idea. It is much more elegant.

That's helpful. I could use something like this yet, or go with sergio's idea again. :P
Logged

Great music doesn't force you to think; it allows you to.


Finished Levels:
Pages: [1] Print 
nifflas.ni2.se  |  Nifflas' Support Forum  |  Level Editing Support  |  Knytt Stories Level Editing Support  |  Topic: A Warp requiring three Flags... « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.20 | SMF © 2013, Simple Machines