RTSUnit and Player
by Robert Stewart · in RTS Starter Kit · 04/14/2005 (11:07 am) · 8 replies
Hey, I was wondering if anyone knows what is going on when I add a Player(FPS) to my game. I can have any of them in the game by them selfs, but when I get a RTSUnit and Player in the game it crashes. Ok so basically im just looking for guesses, any ideas?
About the author
#2
Do you know where in the code the crash is happening? Or what's at the end of the console log? Have you run a debug build so you can check for any asserts getting tripped?
04/14/2005 (4:46 pm)
Josh - I didn't know we tested RTSUnit and Player together... Though some people have seemed to have them interact without problems.Do you know where in the code the crash is happening? Or what's at the end of the console log? Have you run a debug build so you can check for any asserts getting tripped?
#3
04/14/2005 (4:59 pm)
Console is clean, it crashes before it can report any errors. I have no clue where in code it is crashing and dont have much of an idea of where to look. And yes I have run in Debug mode, and it reports nothing.
#4
04/14/2005 (5:02 pm)
Have you run it under a debugger? Debug mode is basically designed so that you get information when you crash the program under a debugger--without the debugger, Debug mode doesn't help much!
#5
Con::printf("10");[/code] in RTSUnit.cc processTick under PROFILE_START(RTSUnit_Z);
I put printf's everywhere, almost every other line. My console reported 99 but not 10, dont ask me why 10 is after 98.
EDIT: Stephan when I try debugger mode it says it cant find main.cs probrally ez fix, I havent tried yet.
04/14/2005 (5:23 pm)
Ok I think this is where it is crashing. Con::printf("98");
}
Con::printf("99");
PROFILE_END();
Con::printf("10");Con::printf("10");[/code] in RTSUnit.cc processTick under PROFILE_START(RTSUnit_Z);
I put printf's everywhere, almost every other line. My console reported 99 but not 10, dont ask me why 10 is after 98.
EDIT: Stephan when I try debugger mode it says it cant find main.cs probrally ez fix, I havent tried yet.
#6
04/14/2005 (6:03 pm)
Why would it break soon as the profile ends? hmm..
#7
11/11/2005 (4:57 am)
Here's an interesting thought, if I added a player rather than an RTS unit in createPlayer, would client side stuff like selection and selection circles still work properly?
#8
That should allow selection and the circles.
11/11/2005 (8:30 am)
If you have managed to get RTS units and the Player class working toghether, then all you have to do is add case "Player": %this.onMouseDownUnit(%obj);to onMouseDown inside inputhandler.cs
That should allow selection and the circles.
Torque Owner Josh Williams
Default Studio Name