(Including this one by Kaminsky, which i am very thankful for https://zandronum.com/forum/viewtopic.p ... 55#p110411). Whether its for cooldowns, information checks and such.
I was guided towards some alternatives when possible and i tried to clientside some stuff (but doing so resulted in some weapons straight up not acknowledging an item's presence or such)
And my most recent experiment is the one i fear the most will become problematic. Concidering that larger groups of monsters tend to just out with patrol nodes because a pixel of em couldnt reach EXACTLY its location, i decided to try making patrol nodes that would unleash a script in a radius that makes them go after the node on their TID+1. The script works and everything but almost everything runs on single tics, and no matter what i seem to do, adding a single tic to ANYTHING seems to make things either out massively or straight up not do anything, monsters just standing still as if it didnt exist.
I'll drop the script and if someone can figure something out that'd be appreciated:
ACS:
Code: Select all
int ChasePVE;
int ChaserPVE;
//will eventually add an element that terminates the script if the tid is below 1
Script "PVEPath" (void)
{
If ( CheckInventory("PVELockout"))
{
Terminate;
}
ChaserPVE = ActivatorTID();
ChasePVE = CheckInventory("PatrolItem");
int ChaserID = UniqueTID();
Thing_ChangeTID(0, ChaserID);
Thing_SetGoal (ChaserID, ChasePVE, 0, 0);
Thing_ChangeTID(0, ChaserPVE);
TakeInventory("PatrolItem", 0x7fffffff); ///setting to a numbered value makes it too unstable and makes the script not working/buggy af for some reason???
delay(1);
GiveInventory("PVELockout", 1);
}
Code: Select all
ACTOR PatrolAOE : PatrolPoint 11099
{
States
{
Spawn:
//TNT1 A 0
TRED A 0 nodelay A_RadiusGive("PatrolItem", 256, RGF_MONSTERS, tid)
TNT1 A 0 A_RadiusGive("PatrolItem", 256, RGF_MONSTERS, 1)
TNT1 A 0 A_RadiusGive("PatrolScriptItem", 256, RGF_MONSTERS, 1)
TRED A 1
Loop
}
}
Actor PatrolItem : Inventory { Inventory.MaxAmount 999999 }
ACTOR PatrolScriptItem : CustomInventory
{
+INVENTORY.ALWAYSPICKUP
+INVENTORY.AUTOACTIVATE
-Invbar
Inventory.MaxAmount 1
States
{
Spawn:
TNT1 A 1
stop
Pickup:
TNT1 A 0 A_JumpIfInventory("PVELockout", 1, "PveLock")
TNT1 A 0 ACS_NamedExecuteAlways("PVEPath")
TNT1 A 1
stop
PveLock:
TNT1 A 1
fail
}
}
ACTOR PVELockout : PowerHighJump
{
Powerup.Duration -5
Powerup.Strength 0
+INVENTORY.AUTOACTIVATE
}
Weapon reload acs:
Code: Select all
Script "ReloadDemo" Enter
{
If (CheckInventory("NaderAmmo") == 4)
{
TakeInventory("NaderCooldown", 35);
Delay(1);
Restart;
}
Else if (CheckInventory("NaderCooldown") == 0)
{
If (CheckInventory("NaderAmmo") < 3)
{
GiveInventory("NaderAmmo", 1);
GiveInventory("NaderCooldown", 9); //was 18 or 35
Delay(1);
Restart;
}
else
{
GiveInventory("NaderAmmo", 1);
Delay(1);
Restart;
}
}
Else
{
TakeInventory("NaderCooldown", 1);
Delay(1);
Restart;
}
}
And the cooldown script is as follow:
Code: Select all
Script "Cooldown Script" Enter //clientside
{
TakeInventory("Cooldown1", 1);
TakeInventory("Cooldown2", 1);
Delay(1);
Restart;
}
As for the health view script i mentionned earlier, it works well in solo but in lan testing, it starts flickering like crazy to the point where it starts hurting the eyes.
So yeah... here's that. If anyone can provide suggestions/help, it would be appreciated. Cause these scripts works pretty well offline (and somehow on a lan test), but its online that i fear this might take the shitter.