Re: TFC - Teleporters? -
05-10-2005
In foxbot, which I don't think evil posted up there, when there is a #Teleporter_Entrance_Built/#Teleporter_Exit_Built message (I think), it will search for nearby teleporters and set the user to the builder (given in the message state 3). I tried this and added a few tweaks, such as checking if "pTeleporter->v.framerate == 0" as it shows it was just built, and ensures it doesn't pick up other nearby teleporters.
(it is rather more difficult doing this with sentries though if you want to pick up the building_sentrygun entitiy as they do not appear when the #Sentry_built message is sent.)
It works well, but using teleporters is a bit more complex (see evils code above)
typically what I do, is that if they find a teleporter that is nearby them, and the exit is nearer their goal than they are, and they are not closer to the teleporter exit than the goal, then they will use the teleporter. Things like "looping" can happen though which means they use the teleporter over and over again because they had to go back up where the entrance was. What I tried to do was add the teleporter to a list which it ignored when it used it, but I'm having trouble deciding when to do that.
Last edited by Cheeseh; 05-10-2005 at 12:19..
|