Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
pierremgi

MP: who is player?

Recommended Posts

There are one "bug" report and one feature request.

 

Bug concerns the fact you have to "share" your player's name with a playable unit when you respawn:

respawn and check for unit's name. Now there are 2 "your player's name", you and the unit which lost its engine's name (probably those chosen in lobby at start).

is there a remote link  with the error: No unit can revive you ? One sure thing, this occurs since v 1.56 and Eden.

 

The other point is a feature request: make player variable consistent with your identity, equipment and situation in any case!

The minimum is to keep the player's name on team switch and on respawn. Furthermore, you could make player's keeps his equipment on respawn, not a poor save/load inventory, an exact count of bullets on each magazines. Always further more, player could keep all the addactions and menu. It's a pain in the ass to cope with teamswitch in SP or respawn in MP, just to retrieve the same config for the player. player addAction is too hard to manage in all these cases. Is it difficult to embed added actions in a player variable, automatically?

 

So far, what I'm (rather) sure:

- global var handle allows to manage addAction far more better than (_this select 2) which needs the action to be triggered to exist;

- addAction always need to be re-run after respawn.

 

In SP, if I switch unit, player seems to be the former unit!

In MP, who is player after respawn?

At start, If I check player in debug console there will be an answer like Bis_O2_1996 (a variable I guess).

After respawn, player is always Bis_O2_1996, but cursortarget on my corpse also! So, And, as I wrote above... there are 2 alive units named "with my player's name" (hosted server). Who is player?

Share this post


Link to post
Share on other sites

switchable unit is a bit of a odd ball, in MP the player is the current unit the client is controlling, dead unit becomes AI after player respawns, variable obviously will stay because it doesn't erase any of that information when it switches over to AI.  

Share this post


Link to post
Share on other sites

Thanks for this approach. Respawn triggers some scripts like onPlayerRespawn or EventHandler "respawn". This is fine for managing something for player (equipments, action menus...).

The 2 very odd behaviors (as far as i can understand) is switching (your action menu could stay on the former unit, your identity also) and in MP, returning to lobby for choosing another playable unit. I wonder what could be the script or the variable workable for a mission maker about that.

No sure to have attention of developers. So if any idea, I thank you so much.

Share this post


Link to post
Share on other sites

The question is: how to avoid the "player" unit in editor for SP mission?

I like to make mission for SP - MP session. This works fine except the fact I have 2 players with my name (or player's name) in MP if I choose a playable unit other than player one.

In MP, you can make all playable units and don't care with "player" one. In SP you need a player as you are not starting in a lobby. So how can I script this player for SP only?

Share this post


Link to post
Share on other sites

×