Anyway, the closer it gets, the more it is supposed to slow the player down. I've had luck modifying the player's speed in past mods in DECORATE by calling ACS scripts in the appropriate places using a tID of 0. Now, I'm trying to have something else do this, and it isn't working.
Here's the relevant code:
In DECORATE, the See state jumps based on proximity.
Code: Select all
See:
SPOS A 0 A_Jumpifcloser(256, "CloseSee")
SPOS A 0 A_Jumpifcloser(512, "NearSee")
SPOS A 0 A_Jumpifcloser(1024, "MedSee")
Goto FarSee
FarSee:
TNT1 A 0 ACS_Execute(202, 0, 0, 0, 0)
TNT1 A 0 A_SetTranslucent(0.40)
SHAD AABBCC 3 A_Chase
Goto See
MedSee:
TNT1 A 0 ACS_Execute(203, 0, 0, 0, 0)
TNT1 A 0 A_SetTranslucent(0.50)
SHAD AABBCC 3 A_Chase
Goto See
NearSee:
TNT1 A 0 ACS_Execute(204, 0, 0, 0, 0)
TNT1 A 0 A_SetTranslucent(0.60)
SHAD AABBCC 3 A_Chase
Goto See
CloseSee:
TNT1 A 0 ACS_Execute(205, 0, 0, 0, 0)
TNT1 A 0 A_SetTranslucent(0.70)
SHAD DDEEFF 3 A_Chase
Goto SeeScripts:
Code: Select all
Script 1 ENTER
{
Thing_ChangeTID(0, (1000 + PlayerNumber()));
}
//set speed 100%
script 202 (void)
{
SetActorProperty((1000 + PlayerNumber()), APROP_Speed, 1.0);
}
//set speed 75%
script 203 (void)
{
SetActorProperty((1000 + PlayerNumber()), APROP_Speed, 0.75);
}
//set speed 50%
script 204 (void)
{
SetActorProperty((1000 + PlayerNumber()), APROP_Speed, 0.5);
}
//set speed 25%
script 205 (void)
{
SetActorProperty((1000 + PlayerNumber()), APROP_Speed, 0.25);
}
