I'm working on a mod for Oblige and I have some security cameras that generate into maps.
The camera 'things' TIDs are all initially set to '0', like all monsters and other actors.
I am attempting to assign a unique TID for each camera, so far with success, except that the script from the Wiki not only gives the security cameras unique TIDs, but gives monsters the same TID and carries on assigning all monsters TIDs. (screenshots at bottom of post)
The security camera actor itself defined in DECORATE is as follows:
Code: Select all
ACTOR DNSecCam 9766 //This number does not clash with any other actor number.
{
Radius 8
Height 12
Scale 0.6
+SPAWNCEILING
+NOGRAVITY
States
{
Spawn:
SECC AAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHH 0 ACS_ExecuteAlways(999, 0)
SECC AAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHH 1 A_SetAngle(angle -2) //This rotates the camera constantly.
Goto Spawn+129 //I may not need all these frames, but Goto jumps to first frame in SECC line 2.
}
}
Code: Select all
#include "zcommon.acs"
int GiveTID = -32767;
function int NextTID (void)
{
for ( ; GiveTID < 0; GiveTID++)
{
if (!ThingCount (T_NONE, GiveTID))
{
return GiveTID;
}
}
return 0;
}
Script 999 (void)
{
if (!ActivatorTID ())
{
Thing_ChangeTID (0, NextTID ());
}
}
However, when I start a new game on MAP01, the script gives the DNSecCams TIDs correctly, but also gives monsters the same TID numbers and continues to give monsters TIDs until no monsters are left to be given a TID.
Please can anyone explain how or what I can do to have this script only give TIDs to the DNSecCams?
Many thanks!