I'm trying to spawn extra computer controlled players for a game using the UT2003 engine.
Long story short, I'm trying to spawn them manually. I suspect that the way bots are normally spawned is located inside the native code when the map/level loads (probably basic knowledge, but it's my guess at this point. .
I have managed to spawn the pawn I want, and it looks fine.
This is where things get hard....
When I spawn a controller for the pawn, Level.controllerlist shows that for every controller I spawn, it actually spawns two controllers pointing to the same pawn.... I know this because if I spawn no controllers there are no controllers pointing to the pawns I spawned.
The controllers and pawns I'm using (stock) are quite some generations away from "AIController" and "Pawn". The exact class of the controller I'm using contains two references to the pawn, and the exact class of the pawn I'm using contains two references to the controller (for class specific purposes I'm guessing).
So... back to my two spawned controllers. For the one I spawned and have a variable pointing to, both references to its pawn are correct, as per my settings, however the other controller is only half correct since one of its references to its pawn points to none. I decided to try deleting the one that wasn't fully correct since it wasn't the one I had a variable pointing to.
That seems to have worked, but I'm still not sure why it spawns 2 controllers.
Now the computer players can run around nicely like I told them to, but the server crashes when it tries to run a native function determining a relationship of some sort with all of the other computer players.
I know I must either be forgetting to set something, or this is something that needs to be handled at the native level. Either way, I'm looking for a way to dump all of the variables of every controller and pawn in the map/level and all references to them. I really don't feel like having to go write a gigantic log() on every variable, although I've already started doing something like that.
Basically, at this point I'm trying to find the difference between a normally spawned computer player, and my type of computer spawned player.
Long story short, I'm trying to spawn them manually. I suspect that the way bots are normally spawned is located inside the native code when the map/level loads (probably basic knowledge, but it's my guess at this point. .
I have managed to spawn the pawn I want, and it looks fine.
This is where things get hard....
When I spawn a controller for the pawn, Level.controllerlist shows that for every controller I spawn, it actually spawns two controllers pointing to the same pawn.... I know this because if I spawn no controllers there are no controllers pointing to the pawns I spawned.
The controllers and pawns I'm using (stock) are quite some generations away from "AIController" and "Pawn". The exact class of the controller I'm using contains two references to the pawn, and the exact class of the pawn I'm using contains two references to the controller (for class specific purposes I'm guessing).
So... back to my two spawned controllers. For the one I spawned and have a variable pointing to, both references to its pawn are correct, as per my settings, however the other controller is only half correct since one of its references to its pawn points to none. I decided to try deleting the one that wasn't fully correct since it wasn't the one I had a variable pointing to.
That seems to have worked, but I'm still not sure why it spawns 2 controllers.
Now the computer players can run around nicely like I told them to, but the server crashes when it tries to run a native function determining a relationship of some sort with all of the other computer players.
I know I must either be forgetting to set something, or this is something that needs to be handled at the native level. Either way, I'm looking for a way to dump all of the variables of every controller and pawn in the map/level and all references to them. I really don't feel like having to go write a gigantic log() on every variable, although I've already started doing something like that.
Basically, at this point I'm trying to find the difference between a normally spawned computer player, and my type of computer spawned player.