getting another player's object in C++ (HELP!)
by Matthew Franklin · in Technical Issues · 09/10/2002 (9:35 pm) · 1 replies
What's the best way to look it up? I tried Sim::findObject() by clientId (provided by a gui component on the MsgClientJoin), which worked fine on one client but not the other-- apparently the clientIds they send back and forth aren't always usable by findObject.
I tried the name of the player in Sim::findObject, and that also didn't work.
Anyway, I'm testing on one player right now, because the old findObject with clientId works fine with the bots-- it only crashes the clients when real live people join in. But I'm off to work on other parts of the mod, because I can't figure this out. I want to get particular opponents (actually, I want to get up to two teammates), and I want their camera transforms. Once I get their GameConnection or ShapeObject I'm fine, but like I said, that's only working for one player right now.
Any help MUCH appreciated!
I tried the name of the player in Sim::findObject, and that also didn't work.
Anyway, I'm testing on one player right now, because the old findObject with clientId works fine with the bots-- it only crashes the clients when real live people join in. But I'm off to work on other parts of the mod, because I can't figure this out. I want to get particular opponents (actually, I want to get up to two teammates), and I want their camera transforms. Once I get their GameConnection or ShapeObject I'm fine, but like I said, that's only working for one player right now.
Any help MUCH appreciated!
Torque Owner Bryan "daerid" Ross