Public Member Functions | |
kActor | GetActorByTID (const int tagID, const int typeFilter=- 1) const |
if typeFilter is -1 checks any type otherwise only returns the actor of that type | |
bool | TriggerActorsByTID (kActor@ instigator, const int tagID) |
Triggers an actor (that is not the instigator) that has the same tagID. Returns true if triggered an actor. | |
void | ChangeAreaFlag (const int areaID, const uint flags, const bool active) |
(EnumAreaFlags) Only sets the areaID flags and not the sector flags. Should most likely prefer using FloodMatchingAreaFlags so the sectors get set as well. | |
void | FloodFillAreaFlags (const int sectorIndex, const uint flags, const bool active) |
(EnumAreaFlags) Sets flags on all adjacent sectors until it finds a sector that has the flags already set (or cleared if active is false) | |
void | FloodFillAreaFlags (const kVec3 &in origin, const uint flags, const bool active) |
(EnumAreaFlags) Calls FloodMatchingAreaFlags with FindNextClosestSector(origin) sector. | |
void | FloodMatchingAreaFlags (const int sectorIndex, const uint flags, const bool active) |
(EnumAreaFlags) Sets flags on all adjacent sectors with matching areaID. | |
const uint | GetAreaFlags (const int areaID) const |
EnumAreaFlags. | |
const int | GetAreaFloorImpact (const int areaID) const |
EnumImpactType. | |
const int | GetAreaWallImpact (const int areaID) const |
EnumImpactType. | |
void | ChangeAreaFloorImpact (const int areaID, const int value) |
value: EnumImpactType | |
void | ChangeAreaWallImpact (const int areaID, const int value) |
value: EnumImpactType | |
void | ChangeAreaWaterHeight (const int areaID, const float height) |
WaterHeight is stored per area, not per sector or per vertex. | |
const int16 | GetAreaArg (const int areaID, const int arg) const |
Returns an area arg value. | |
void | ChangeAreaArg (const int areaID, const int arg, const int16 value) |
void | ChangeSectorHeight (const int sectorIndex, const float height) |
Changes all sectors floor vertices with the same areaID to the height. | |
void | ChangeSectorCeilingHeight (const int sectorIndex, const float height) |
Changes all sectors ceilng vertices with the same areaID to the height. | |
void | ChangeSectorCeilingHeightVertices (const int sectorIndex, const float height, const int ptMask=7) |
Changes only the sector ceiling vertices(specfied using the ptMask) to the height. | |
void | ChangeSectorHeightVertices (const int sectorIndex, const float height, const int ptMask=7) |
Changes only the sector floor vertices(specfied using the ptMask) to the height. | |
const int | FindNextClosestSector (const kVec3 &in origin) |
void | GetSectorCorners (const int sectorIndex, kVec3 &out pt1, kVec3 &out pt2, kVec3 &out pt3, kVec3 &out heights) const |
Get the Sectors vertex position and height Link 1 is pt1 to pt3 Link 2 is pt2 to pt1 Link 3 is pt3 to pt2. | |
void | GetSectorLinks (const int sectorIndex, int &out sectorIndex1, int &out sectorIndex2, int &out sectorIndex3) const |
Get the 3 sectors links. -1 means there was no sector linked to that edge. Link 1 is pt1 to pt3 Link 2 is pt2 to pt1 Link 3 is pt3 to pt2. | |
const uint | GetSectorNumBridges (const int sectorIndex) const |
number of bridge sectors this sector has | |
const int | GetSectorBridge (const int sectorIndex, const uint bridge) const |
Get the sector of the bridge. Use GetSectorNumBridges to loop through them all. | |
const int | GetSectorAreaID (const int sectorIndex) const |
const int | GetNumSectors () const |
const int | GetNumAreas () const |
const int | GetNumActors () const |
number of actors that are in the current maps data | |
const int | GetSectorFlags (const int sectorIndex) const |
Returns a 16 bit unsigned integer. Only the first 16 area flags (up to AAF_MAPPED) are used for sectors. | |
void | SetSectorFlags (const int sectorIndex, const int flags) |
Keep in mind sector flags are a 16 bit unsigned integer and only the first 16 area flags (up to AAF_MAPPED) are used for sector flags. | |
Definition at line 1395 of file t1_scriptAPI.cpp.
void kWorld::ChangeAreaArg | ( | const int | areaID, |
const int | arg, | ||
const int16 | value ) |
areaID | |
arg | though args can be used for anything, they are typically used in this fashion:
0: warp ID
1: warp level ID or trigger sound ID
2: checkpoint ID
3: tag ID
4: floor damage hit points
5: floor damage rate
Hardcoded:
0: AAF_TELEPORT: WarpID
1: AAF_TELEPORT: WarpLevelID, AAF_EVENT and AAF_EVENTSOUND: soundID to play when player enters sector
2: AAF_CHECKPOINT or AAF_SAVEGAME: CheckpointID
3: AAF_EVENT: tag ID
4: Not used
5: AAF_SECRET: the secret index value (set automatically when level loads starting at 0. Conflicts with AAF_DAMAGE (so I guess no secrets should be placed on damaga sectors))
Default Scripts:
0: Not used
1: Not used
2: Not used
3: Not used
5: Always used as floor damage delay no matter the AAF flags. Should be used with AAF_DAMAGE only. 1 second = 1024
|
value |
void kWorld::ChangeAreaFlag | ( | const int | areaID, |
const uint | flags, | ||
const bool | active ) |
(EnumAreaFlags) Only sets the areaID flags and not the sector flags. Should most likely prefer using FloodMatchingAreaFlags so the sectors get set as well.
void kWorld::ChangeAreaFloorImpact | ( | const int | areaID, |
const int | value ) |
value: EnumImpactType
void kWorld::ChangeAreaWallImpact | ( | const int | areaID, |
const int | value ) |
value: EnumImpactType
void kWorld::ChangeAreaWaterHeight | ( | const int | areaID, |
const float | height ) |
WaterHeight is stored per area, not per sector or per vertex.
void kWorld::ChangeSectorCeilingHeight | ( | const int | sectorIndex, |
const float | height ) |
Changes all sectors ceilng vertices with the same areaID to the height.
void kWorld::ChangeSectorCeilingHeightVertices | ( | const int | sectorIndex, |
const float | height, | ||
const int | ptMask = 7 ) |
Changes only the sector ceiling vertices(specfied using the ptMask) to the height.
void kWorld::ChangeSectorHeight | ( | const int | sectorIndex, |
const float | height ) |
Changes all sectors floor vertices with the same areaID to the height.
void kWorld::ChangeSectorHeightVertices | ( | const int | sectorIndex, |
const float | height, | ||
const int | ptMask = 7 ) |
Changes only the sector floor vertices(specfied using the ptMask) to the height.
const int kWorld::FindNextClosestSector | ( | const kVec3 &in | origin | ) |
void kWorld::FloodFillAreaFlags | ( | const int | sectorIndex, |
const uint | flags, | ||
const bool | active ) |
(EnumAreaFlags) Sets flags on all adjacent sectors until it finds a sector that has the flags already set (or cleared if active is false)
void kWorld::FloodFillAreaFlags | ( | const kVec3 &in | origin, |
const uint | flags, | ||
const bool | active ) |
(EnumAreaFlags) Calls FloodMatchingAreaFlags with FindNextClosestSector(origin) sector.
void kWorld::FloodMatchingAreaFlags | ( | const int | sectorIndex, |
const uint | flags, | ||
const bool | active ) |
(EnumAreaFlags) Sets flags on all adjacent sectors with matching areaID.
kActor kWorld::GetActorByTID | ( | const int | tagID, |
const int | typeFilter = - 1 ) const |
if typeFilter is -1 checks any type otherwise only returns the actor of that type
const int16 kWorld::GetAreaArg | ( | const int | areaID, |
const int | arg ) const |
Returns an area arg value.
areaID | |
arg | though args can be used for anything, they are typically used in this fashion:
0: warp ID
1: warp level ID or trigger sound ID
2: checkpoint ID
3: tag ID
4: floor damage hit points
5: floor damage rate
Hardcoded:
0: AAF_TELEPORT: WarpID
1: AAF_TELEPORT: WarpLevelID, AAF_EVENT and AAF_EVENTSOUND: soundID to play when player enters sector
2: AAF_CHECKPOINT or AAF_SAVEGAME: CheckpointID
3: AAF_EVENT: tag ID
4: Not used
5: AAF_SECRET: the secret index value (set automatically when level loads starting at 0. Conflicts with AAF_DAMAGE (so I guess no secrets should be placed on damaga sectors))
Default Scripts:
0: Not used
1: Not used
2: Not used
3: Not used
5: Always used as floor damage delay no matter the AAF flags. Should be used with AAF_DAMAGE only. 1 second = 1024
|
const uint kWorld::GetAreaFlags | ( | const int | areaID | ) | const |
const int kWorld::GetAreaFloorImpact | ( | const int | areaID | ) | const |
const int kWorld::GetAreaWallImpact | ( | const int | areaID | ) | const |
const int kWorld::GetNumActors | ( | ) | const |
number of actors that are in the current maps data
const int kWorld::GetNumAreas | ( | ) | const |
const int kWorld::GetNumSectors | ( | ) | const |
const int kWorld::GetSectorAreaID | ( | const int | sectorIndex | ) | const |
const int kWorld::GetSectorBridge | ( | const int | sectorIndex, |
const uint | bridge ) const |
Get the sector of the bridge. Use GetSectorNumBridges to loop through them all.
void kWorld::GetSectorCorners | ( | const int | sectorIndex, |
kVec3 &out | pt1, | ||
kVec3 &out | pt2, | ||
kVec3 &out | pt3, | ||
kVec3 &out | heights ) const |
Get the Sectors vertex position and height Link 1 is pt1 to pt3 Link 2 is pt2 to pt1 Link 3 is pt3 to pt2.
sectorIndex | |
pt1 | |
pt2 | |
pt3 | |
heights | x is the height of pt1, y is the height of pt2, z is the height of pt3. |
const int kWorld::GetSectorFlags | ( | const int | sectorIndex | ) | const |
Returns a 16 bit unsigned integer. Only the first 16 area flags (up to AAF_MAPPED) are used for sectors.
void kWorld::GetSectorLinks | ( | const int | sectorIndex, |
int &out | sectorIndex1, | ||
int &out | sectorIndex2, | ||
int &out | sectorIndex3 ) const |
Get the 3 sectors links. -1 means there was no sector linked to that edge. Link 1 is pt1 to pt3 Link 2 is pt2 to pt1 Link 3 is pt3 to pt2.
sectorIndex | |
sectorIndex1 | |
sectorIndex2 | |
sectorIndex3 | a sectorIndex with -1 is no sector. |
const uint kWorld::GetSectorNumBridges | ( | const int | sectorIndex | ) | const |
number of bridge sectors this sector has
void kWorld::SetSectorFlags | ( | const int | sectorIndex, |
const int | flags ) |
Keep in mind sector flags are a 16 bit unsigned integer and only the first 16 area flags (up to AAF_MAPPED) are used for sector flags.
bool kWorld::TriggerActorsByTID | ( | kActor@ | instigator, |
const int | tagID ) |
Triggers an actor (that is not the instigator) that has the same tagID. Returns true if triggered an actor.