I'm Looking Around
Posted: Sun May 10, 2020 11:34 pm
Exactly... why wasting time for setting up a DefensePoint into the right direction ? Why not being more unpredictable and looking around instead of reacting like a robot doing the same thing all time ? This is... some YourLevel or whatever MyLevel:
Anyone knowing what is this ?
If this is an open area, in which direction do I need to look ?
Answer: Everywhere, enemy can be everywhere... lol.
Code: Select all
class SearchDefensePoint expands DefensePoint;
var() int RRate;
event PreBeginPlay()
{
Super.PreBeginPlay();
InitialState = 'Tracking';
bFixedRotationDir = True;
}
state() Tracking
{
Begin:
Sleep(1);
if ( Physics != PHYS_Rotating )
SetPhysics(PHYS_Rotating);
Loop:
RRate = RandRange(-13000,13000);
RotationRate.Yaw = RRate;
lookdir = 2000 * vector(Rotation);
Sleep(1);
GoTo('Loop');
}
If this is an open area, in which direction do I need to look ?
Answer: Everywhere, enemy can be everywhere... lol.