Skip to content

Draft: ACS and special activation

Lactozilla requested to merge acs into next

ACS

General

BEHAVIOR lumps are loaded from a map WAD, or between map markers. srb2common.acs contains all functions, specials and enumerations for compiling ACS scripts that SRB2 will accept, and must be included for correct compilation.

Functions

All ACS functions

Game

bool HasUnlockable(int unlockableID)
bool SkinUnlocked(str skinName)
bool IsNetworkGame(void)
bool RingSlingerMode(void)
bool TeamGame(void)
bool CaptureTheFlagMode(void)
bool RecordAttack(void)
bool NiGHTSAttack(void)
bool ModeAttacking(void)
int LowestLap(void)
void SetViewpoint(int tid, [int time])
void MapWarp(str mapLumpName, bool showStats)
int AddBot(str skinName, [str color, int type, str name])
void RemoveBot(int botNum)
void ExitLevel([int showStats])

Map manipulation

int/str GetLineProperty(int tag, int property)
void SetLineProperty(int tag, int property, int/str value)
int/strGetSectorProperty(int tag, int property)
void SetSectorProperty(int tag, int property, int/str value)
int/str GetSideProperty(int tag, int property)
void SetSideProperty(int tag, int property, int/str value)
int ThingCount(str className, int tid, [int sectorTag])
void TagWait(int tag)
void PolyWait(int tag)
void CameraWait(int tag)
void ChangeFloor(int tag, str textureName)
void ChangeCeiling(int tag, str textureName)
int LineSide(void)
void ClearLineSpecial(void)
void SetLineRenderStyle(int tag, int renderStyle, fixed alpha)
void SetLineTexture(int tag, int side, int wallPart, str textureName)
int CountEnemies(str className, int tid)
int CountPushables(str className, int tid)

Player

int PlayerRings(void)
int PlayerScore(void)
bool PlayerSuper(void)
str PlayerSkin(void)
int PlayerEmeralds(void)
bool PlayerBot(int playernum)
bool PlayerExiting(int playernum)
bool PlayerFinished(int playernum)
int PlayerLap(void)
bool PlayerHoldingFlag(int playernum, int flag)
bool PlayerIsIt(int playernum)
void LockPlayer(int time, [bool jumpStasis])
bool CheckPowerUp(int powerup)
void GivePowerUp(int powerup, int value)
bool CheckAmmo(int weapon)
void GiveAmmo(int powerup, int value)
void TakeAmmo(int powerup, int value)
void DoSuperTransformation([bool giveRings])
void DoSuperDetransformation(void)
void GiveRings(int numRings)
void GiveSpheres(int numSpheres)
void GiveLives(int numLives)
void GiveScore(int scoreToGive)
void DropFlag(void)
void TossFlag(void)
void DropEmeralds(void)
void TossEmeralds(void)

Actor

fixed GetActorX(int tid)
fixed GetActorY(int tid)
fixed GetActorZ(int tid)
fixed GetActorVelX(int tid)
fixed GetActorVelY(int tid)
fixed GetActorVelZ(int tid)
fixed GetActorAngle(int tid)
fixed GetActorPitch(int tid)
fixed GetActorRoll(int tid)
fixed GetActorFloorZ(int tid)
fixed GetActorCeilingZ(int tid)
str GetActorFloorTexture(int tid)
int GetActorLightLevel(int tid)
bool CheckActorState(int tid, str state)
bool CheckActorFlag(int tid, str flag)
str GetActorClass(int tid)
int/str GetThingProperty(int tid, int property)
str GetActorDye(int tid)
void SetActorPosition(int tid, fixed x, fixed y, fixed z, bool fog)
void SetActorVelocity(int tid, fixed x, fixed y, fixed z, [bool add])
void SetActorAngle(int tid, fixed angle)
void SetActorPitch(int tid, fixed pitch)
void SetActorRoll(int tid, fixed roll)
void SetActorState(int tid, str state)
void SetActorFlag(int tid, str flag, bool enabled)
void SetActorClass(int tid, str className)
void SetThingSpecial(int tid, int special, [int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10])
void SetThingProperty(int tid, int property, int/str value)
void SetActorDye(int tid, str color)
int Spawn(str className, fixed x, fixed y, fixed z, [int newTID, fixed angle])
int SpawnForced(str className, fixed x, fixed y, fixed z, [int newTID, fixed angle])
void Teleport(int tid, int destTID, [bool silent])
void Thing_TrackAngle(int tid, int anchorTID, fixed failureAngle, int failureTag, [int failureDelay, bool persist])
void Thing_StopTrackingAngle(int tid)
bool Check2dMode(void)
void Set2dMode(bool use2dMode)

Audio

void SectorSound(str soundName, int volume)
void AmbientSound(str soundName, int volume)
void ThingSound(int tid, str soundName, int volume)
void MusicPlay(str musicName, [bool foractivator])
void MusicDim(int fadeTime)
void MusicStopAll(bool foractivator)
void MusicRestore(void)

Math

fixed Sin(fixed x)
fixed Cos(fixed x)
fixed Tan(fixed x)
fixed Arcsin(fixed x)
fixed Arccos(fixed x)
fixed Hypot(fixed x, fixed y)
fixed Sqrt(fixed x)
fixed Floor(fixed x)
fixed Ceil(fixed x)
fixed Round(fixed x)
fixed InvAngle(fixed x)

Miscellaneous

int Random(int a, int b)
str OppositeColor(str color)
void Log(str text)
void Print(str text)
int strcmp(str a, str b)
int strcasecmp(str a, str b)

Specials

Sector_MoveByLine(int tag, int type)
Sector_MoveByFrontSector(int tag, int type)
Sector_Stop(int tag)
Sector_ChangeTag(int tag, int newtag, int options)
Sector_Crush(int tag, int type)

Plane_ChangeScrollerDirection(int tag, int speed)
Plat_StartMovement(int tag, int speed, [int initialDelay, int directionChangeDelay, bool moveUpwardsFirst])

Light_Copy(int tag, [int options])
Light_StartFlickering(int tag, int length, int lightA, bool useTargetForLightB, [int lightB])
Light_StartPulsating(int tag, int length, int lightA, bool useTargetForLightB, [int lightB])
Light_StartBlinking(int tag, int darkTime, int brightTime, int lightA, int options, [int lightB])
Light_Fade(int tag, int light, int speed, [int options])
StopLightingEffect(int tag)

Sector_Shatter3dFloor(int tagOfSector, int tagOf3dFloor)
Sector_Hide3dfloor(int tagOfSector, int tagOf3dFloor, [bool show])
Sector_Crumble3dFloor(int tagOfSector, int tagOf3dFloor, [int options])
Sector_Set3dFloorTranslucency(int tagOfSector, int tagOf3dFloor, int alpha, [bool relative])
Sector_Fade3dFloor(int tagOfSector, int tagOf3dFloor, int alpha, int speed, [int options])
Sector_StopFading3dFloor(int tagOfSector, int tagOf3dFloor, [bool dontFinalize])

ChangeColormap(int tag, int desttag, [int options])
FadeColormap(int tag, int desttag, int duration, [int options])
StopColormapFade(int tag)

ChangeWeather(int weather, [bool global])

StartMetalSonicRace(void)
ConditionSetTrigger(int triggerID)
CallLuaFunction(str functionName)
Earthquake(int duration, fixed intensity, fixed radius)
ChangeSkybox(int viewpointID, int centerPointID, [int options, bool global])
EnableBosses(int bossID, [bool disable])

StopTimer(void)
SetLevelFailed(bool failed)

ACS_NamedExecute(str scriptName, [int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10])
ACS_NamedExecuteAlways(str scriptName, [int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10])
ACS_NamedSuspend(str scriptName)
ACS_NamedTerminate(str scriptName)

LinedefExecute(int tag)
LinedefExecuteRandom(int tag1, int tag2)

Polyobj_DoorSlide(void)
Polyobj_DoorSwing(void)
Polyobj_Move(void)
Polyobj_MoveOverride(void)
Polyobj_RotateRight(void)
Polyobj_RotateRightOverride(void)
Polyobj_RotateLeft(void)
Polyobj_RotateLeftOverride(void)
Polyobj_WaypointMove(void)
Polyobj_TurnInvisibleIntangible(void)
Polyobj_TurnVisibleTangible(void)
Polyobj_SetTranslucency(void)
Polyobj_FadeTranslucency(void)

Special activation

Add documentation here.

Changes to Lua

Add documentation here. Yeah.

Examples

Example maps: acs-example.pk3

Edited by Lactozilla

Merge request reports