Author Topic: Causing freelooking in an AIPlayer bot  (Read 299 times)

I've been playing around with AIPlayers lately, and I started wondering if there was any way to make them freelook.

I fiddled around with traces, by which I mean I used trace(1); on a LAN server and then used a second instance of Blockland to go absolutely nuts with freelooking. However, nothing showed up, so it's not a trigger -- meaning it's one of the 'lost' move commands that you can't package on the server side.

DETECTING freelooking is easy enough -- if(vectorDist(vectorNormalize(%obj.getForwardVector()), vectorNormalize(getWords(%obj.getEyeVector(), 0, 1) SPC 0)) > 0.05) is an if statement that will tell you if a player is freelooking. You could simply !$= the two vectors, but then it's possible for there to be a slight error in calculation causing them to not be the same when you're not freelooking.


Does anyone have any idea for code which will cause bots to freelook, hackily or not?