Gate help

How does a gate trigger work?

I sometimes go in the editor to find out how something was done and so when I flew backwards at the start of PMS part 5 I Was transported into something almost like the regular game except it had the little custom level thing up at the top of the screen. I went in and saw a trigger sprite called gate, so how did this work? (I tested my own "gate" trigger but it didn't work)

@meow, on Oct 11 2008, 09:25 AM, said in Gate help:

I sometimes go in the editor to find out how something was done and so when I flew backwards at the start of PMS part 5 I Was transported into something almost like the regular game except it had the little custom level thing up at the top of the screen. I went in and saw a trigger sprite called gate, so how did this work? (I tested my own "gate" trigger but it didn't work)

If you aren't playing version 1.0.0, that's a bug. The Gate triggers used to be able to teleport the player from custom levels into the main game, but that hole was removed in version 1.0.1. For the record, here's how Gate triggers work if placed in maps that replace the existing regular game (I'll probably add this to the Undocumented Features Guide at some point):

To use the inter-level gates, create a trigger named "Gate", with an Extra2 of X, where X is the gate number. In front of that trigger, place a player-type sprite (of the Player's ship, in layer 10, with script *beam-gun beam (note: the script makes the sprite vanish as soon as the level loads, so that it doesn't interfere with anything)), with the name Gate X Start, with the same replacement for X as above.

When the player enters one of the Gate triggers, the ship will fly off at full speed, turning to face in the direction of the trigger. Collisions will still be turned on, so they can take damage from walls, or be stopped by force fields. After the player leaves the level, the destination level will load, with the player appearing at Gate X Start, with X being the number of the Gate that links back to the level the player came from. If there is no appropriate Gate X Start, the player will start at the center of the destination level (and the level transition graphics will not work properly).

Warning: If you give a Gate any Extra2 not listed below, the player will fly off as in a normal Gate, but instead of a new level loading, the game will crash. This includes the Gate with Extra2 = 6.

Wasteland:
Gate 1: Wasteland->Forest
Gate 2: Wasteland->Factory
Gate 3: Wasteland->Factory (star area)
Gate 4: Wasteland->Volcano
Gate 17: Wasteland->Race

Race:
Gate 18: Race->Wasteland

Volcano:
Gate 8: Volcano->Wasteland
Gate 9: Volcano->Factory

Factory:
Gate 5: Factory->Wasteland (star area)
Gate 6/106: Factory->Wasteland (start point is Gate 6 Start, Gate is Extra2 = 106)
Gate 7: Factory->Volcano
Gate 10: Factory->Ice Caves
Gate 11: Factory->Forest
Gate 100: Factory->End Zone

Forest:
Gate 12: Forest->Wasteland
Gate 13: Forest->Factory
Gate 14: Forest->Ice Caves

Ice Caves:
Gate 15: Ice Caves->Factory
Gate 16: Ice Caves->Forest

End Zone:
Gate 99: End Zone->Factory

Tutorial:
Gate 999: Quit to main menu (Note: "Gate 999 Start" exists, but I don't think it does anything.)

Edwards, would it be possible for you to make a demonstration level, because I have a hard time understanding that.
would I need something like Gate 20 Start with an Ex2 of 21, and a Gate 21 Start trigger with and Ex2 of 20?

Confuzeldedly,
-K

@kasofa1, on Oct 15 2008, 08:35 AM, said in Gate help:

Edwards, would it be possible for you to make a demonstration level,...

Well, it won't be functional unless you convert it into an LMScene and put it in the game, but sure.

- Edwards

Attached File(s)

Sigh and here I thought you could teleport from one custom level to another. Sounds cool though!

Whats exactly is an LMScene?
sorry for a stupid question

-K

@kasofa1, on Oct 16 2008, 02:04 PM, said in Gate help:

Whats exactly is an LMScene?

LMScene is the format of map used by the game to store the built-in levels. It's very similar internally to .SketchMap, except that it only contains the sprites that make up the map, not things like the name, author, weapons, etc.

Edwards