A Warp requiring three Flags...

  • 5 Replies
  • 3140 Views
*

Offline Fubaka

  • 641
  • 86
  • We are the music makers.
    • View Profile
    • My Music Page
A Warp requiring three Flags...
« on: April 20, 2016, 12: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, 12:54:51 by Fubaka »
Things to remember when writing figures of speech and sound:
The power of poetry comes from the ability to defy logic. Defy logic often.

Use a metaphor and tell us that your lover is the sky. Tell us that your lover is the sky. When you do that, we won't believe you. We won't believe you because saying so makes no sense, but we'll see a meaning. We'll see a meaning.

The other thing is the ability to be remembered. Love anything.

Love anything

*

Offline sergiocornaga

  • 1285
  • 131
    • View Profile
    • Sergio's Games
Re: A Warp requiring three Flags...
« Reply #1 on: April 20, 2016, 13: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: [Select]
FlagWarpX(A)=1
FlagWarpX(B)=1
FlagWarpX(C)=1
Flag(A)=0
Flag(B)=1
Flag(C)=2

*

Offline Vegetal Gibber

  • 780
  • 176
  • Sorry excuse for a game designer
    • View Profile
    • VG's Games Portfolio
Re: A Warp requiring three Flags...
« Reply #2 on: April 20, 2016, 14: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: [Select]
[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.
Some KS levels by me:

*

Offline Fubaka

  • 641
  • 86
  • We are the music makers.
    • View Profile
    • My Music Page
Re: A Warp requiring three Flags...
« Reply #3 on: April 20, 2016, 19: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: [Select]
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.
Things to remember when writing figures of speech and sound:
The power of poetry comes from the ability to defy logic. Defy logic often.

Use a metaphor and tell us that your lover is the sky. Tell us that your lover is the sky. When you do that, we won't believe you. We won't believe you because saying so makes no sense, but we'll see a meaning. We'll see a meaning.

The other thing is the ability to be remembered. Love anything.

Love anything

*

Offline egomassive

  • 1850
  • 250
    • View Profile
    • egomassive games
Re: A Warp requiring three Flags...
« Reply #4 on: April 20, 2016, 23: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, 23:11:02 by egomassive »

*

Offline Fubaka

  • 641
  • 86
  • We are the music makers.
    • View Profile
    • My Music Page
Re: A Warp requiring three Flags...
« Reply #5 on: April 21, 2016, 00: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
Things to remember when writing figures of speech and sound:
The power of poetry comes from the ability to defy logic. Defy logic often.

Use a metaphor and tell us that your lover is the sky. Tell us that your lover is the sky. When you do that, we won't believe you. We won't believe you because saying so makes no sense, but we'll see a meaning. We'll see a meaning.

The other thing is the ability to be remembered. Love anything.

Love anything