Home   Help Search Login Register  

Author Topic: NO selectPlayer in Multiplayer?  (Read 1779 times)

0 Members and 1 Guest are viewing this topic.

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
NO selectPlayer in Multiplayer?
« on: 15 Feb 2009, 22:56:59 »
Tried all this on dedi:

Just two men on Rahmadi, one BLUFOR and one CIV.
Both are "playable" from start.

Repeatedly Radio Alpha Trigger:

newguy = (nearestObjects [player, ["Man"], 50]) select 1;
addSwitchableUnit newguy;
newguy disableAI "MOVE";
newguy disableAI "TARGET";
newguy disableAI "AUTOTARGET";
newguy disableAI "ANIM";
selectPlayer newguy;

When I switch to the "newguy" I don't get full control over him, it's as if the AI is still working.
When I start running I get teleported to the original position.
If I turn to the side I get turned back.
If I lay down I rise back up.

When I switch back to my original playing unit, it works fine.

Does anyone know if the selectPlayer command works at all in MP? It would be cool if it did.

Laggy
« Last Edit: 15 Feb 2009, 23:01:31 by laggy »
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline i0n0s

  • Former Staff
  • ****
Re: NO selectPlayer in Multiplayer?
« Reply #1 on: 16 Feb 2009, 00:08:17 »
The selectPlayer works. But the unit has to be local:
Code: [Select]
_grp = group newguy;
_leader = leader _grp == newguy;
[newguy] joinSilent player;
oldguy = player;
selectPlayer newguy;
[newguy] joinSilent _grp;
if (_leader) then {_grp selectLeader newguy};
Don't forget one thing:
As soon as newguy dies the player don't respawn, not even as seagull. So add a killed-handler to switch back to the players original figure.

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: NO selectPlayer in Multiplayer?
« Reply #2 on: 16 Feb 2009, 10:07:17 »
Thanks a lot,

Have to try this out  :clap:

Laggy
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.