Friggin' flag warps, how do they work?

  • 4 Replies
  • 2361 Views
*

Offline Healy

  • 352
  • 50
    • View Profile
Friggin' flag warps, how do they work?
« on: April 26, 2012, 18:57:38 »
I want to change an area slightly after a major event, hinting to the player what should be her next destination. I know flag warps are the best way to handle this; unfortunately, I have no idea how to use them. Would anybody be willing to make a step-by-step guide, or something similar, on how to use flag warps?

*

Offline AA

  • 510
  • 23
  • Was ITA84
    • View Profile
    • Insight on Videogames
Re: Friggin' flag warps, how do they work?
« Reply #1 on: April 26, 2012, 19:44:33 »
I don't think a comprehensive guide on Flags has ever been made. I only remember a few specific use-cases (like this one; I don't know if it can help you).

Basically, the 'major event' in your level should have the player go through a Shift somehow, and that Shift should set a Flag of your choice on (say, ShiftFlagOn(A)=0 would have Shift A set the 0 Flag on when taken). The Flag Warp should be put in the screen you want changed (or screens, if they're more than one).

As the player enters the screen (from any direction), a check with the current state of the Flag you chose should be made (Flag(A)=0, for example; A, B or C doesn't matter unless you want to use more Flags at the same time). If the Flag is off, nothing will happen and the player will be in the screen s/he entered; if the Flag is off, the player will instead end up in the screen indicated by the Flag Warp (for instance, FlagWarpX(A)=2 will make the player enter the screen 2 screens to the right of the current one; note that A corresponds to the letter you chose for the Flag check, Flag(A)=0 in this case).

If you wanted help with how to do this in the Manager, I'm sorry but I've almost never used it.
Videogames are for everyone, by everyone

*

Offline Healy

  • 352
  • 50
    • View Profile
Re: Friggin' flag warps, how do they work?
« Reply #2 on: April 26, 2012, 20:54:33 »
That's okay, I'm sure somebody will know how to do it from the manager.

A question, though: when you say a flag warp should be put on the screens you want changed, does that mean the screen itself, or the screens that lead into it (i.e., the screens around it)? That's the part I find most confusing about flag warps.

*

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: Friggin' flag warps, how do they work?
« Reply #3 on: April 26, 2012, 21:52:58 »
On the source screen, you place a flag warp, and on the destination screen, you place a regular warp to guide the player back upon exiting the area.


So, you have your world, with a special screen. Example:

Code: [Select]
[ j ][   ][ f ][   ][ s ]
          [ d ]         
j = juni, f = flagwarp, s = shift.

You start at the left screen. You go 2 screens to the right and find a screen with a well, but its closed with somekind of electronic door. You go 2 screens to the right to find the switch.

This shift could do 2 things. Either it sets a flag or it teleports you to a copy of the world where everything you want changed is changed. If you design your level well, you can use this world/copy at most cases, because usually you don't need to go all the way back, so you can design your level so that won't be possible anymore. But your question is about flags, so lets tell you about the alternative.

So, at screen s, you set the switch, which shifts you to the same screen and sets a flag to the state on. Now you move back 2 screens to the left.

On this screen, you place your flag warp. Due to this being here, and you set that a flag must be evaluated, you can move the player to another screen which has the well open. In my example, that is screen d.

Screen D is a copy of screen f, with the exception that you remove the flagwarp and replace it for a warp, and of course, here the well is open.

You may wonder why to put a warp on this screen, well if the player decides to jump over the well or moves back, they should be warped back to the world.

So: f has a flag warp, d has a normal warp.
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 Healy

  • 352
  • 50
    • View Profile
Re: Friggin' flag warps, how do they work?
« Reply #4 on: April 26, 2012, 23:01:56 »
THANK YOU! That help out a lot.