DoorOtherMap¶
A loading zone to another map with customisable movement before and after the load.
Data Arrays¶
data[0]
: The map id this leads todata[1]
: If 1, thecamoffset
is set tovectordata[3]
when fading in after the map load which overrides the value from the new map's configuration. This is optional, if it doesn't exist, no changes to the camera is donedata[2]
: If 1, thecamangleoffset
is set tovectordata[4]
when fading in after the map load which overrides the value from the new map's configuration. This is optional only ifdata[1]
doesn't exist toodata[3]
: If 1, the map.camlimitpos
and map.camlimitneg
are set tovectordata[5]
andvectordata[6]
respectively when fading in after the map load which overrides the values from the new map's configuration. This is optional only ifdata[1]
doesn't exist toodata[4]
: If 1, there will be no movement before the map load and instead, allplayerdata
entity.rigid
will have their gravity disabled in kinematic mode. This is optional, if it doesn't exist, movement happens as normalvectordata[0]
: The position the party will move to before fading out before the map load ifdata[4]
isn't 1vectordata[1]
: The position the party will spawn after the map loadvectordata[2]
: The position the party will move to when fading in after the map loadvectordata[3]
: Thecamoffset
is set when fading in after the map load ifdata[1]
is 1 which overrides the value from the new map's configuration. This is optional only ifdata[1]
doesn't existvectordata[4]
: Thecamangleoffset
is set when fading in after the map load ifdata[2]
is 1 which overrides the value from the new map's configuration. This is optional only ifdata[1]
doesn't existvectordata[5]
: Thecamlimitpos
is set when fading in after the map load ifdata[3]
is 1 which overrides the value from the new map's configuration. This is optional only ifdata[1]
doesn't existvectordata[6]
: Thecamlimitneg
is set when fading in after the map load ifdata[3]
is 1 which overrides the value from the new map's configuration. This is optional only ifdata[1]
doesn't existemoticonoffset.x
: If it's higher than 0.1, the movement after the map load is done with a JumpTo call on the player with this value as the height. If it's lower, a standard MoveTowards is used on the player entity instead
Additional data¶
regionalflag
: If it's positive, it's the regionalflag slot that is set to true when the player collides with this object.activationflag
: If it's above 0, the flag slot that is set to true when the player collides with this object. It is not possible to specify 0 and will be treated the same as not providing a value.
CreateEntities¶
The insideid
is set to -2 which excludes it from the MapControl.RefreshInsides logic where it could toggle the gameObject enablement if the current insideid
didn't match (or entity.hideinside
is true while being in the same insideid
).
Setup¶
A few adjustements occurs:
- The entity.
alwaysactive
is set to true - The gameObject's isStatic is set to true
- The entity.
rigid
is placed in kinematic mode without gravity nointeract
is set to true- The layer is set to 0 (default)
- The
scol
is disabled
Update¶
If the timer
hasn't expired yet, it is decremented by the game's frametime clamped from 0.0 to infinity. Otherwise, if it is 0.0 and the entity isn't dead
, a Death coroutine is started with the entity.
MapControl.RefreshInsides¶
If we are getting outside while hideinsides
is true (which is only the case to hide the break room part of the AntTunnels
map), normally, this method would go through all map entities that are inside (or their entity.hideinside
is true) and disable them and keep the others enabled.
This object type is excluded from this logic meaning it will never get deactivated from this.
MapControl.LateUpdate¶
After 20 frames has passed since the load of the map and every 2 frames, this object type has some special logic where the gameObject and its entity.emoticon
's gameObject gets disabled if the player gets 15.0 (ignoring y) or more away from the object and enabled if it gets back within 15.0.
OnTriggerStay¶
This does nothing if any of the following is true:
- The other gameObject isn't the player
- We are
inevent
- We are in a
pause
hit
is true (never happens under normal gameplay)
The regionalflag slot at regionalflags
and the flag slot at activationflag
are set to true.
If we aren't in a minipause
, a TransferMap coroutine is started with data[0]
as the map id, vectordata[0]
as the position to move to before the load, vectordata[1]
as the position to spawn after the load, vectordata[2]
as the position to move to after the load and this object as the caller.