Coronium Ace - player_id for messaging and custom event

Hello,

In the calls for :

  • ace.message ( message[, to_player_id] )

  • ace.event ( data_tbl, event_type[, player_id] )

Is the parameter player_id referring to the clientPlayerNumber ? i.e 1 or 2

I have no success when I set values 1 or 2.

How do we get the player_id ?

Thank you for your help

Hi,

The following methods can be used to get the player id:

https://develephant.github.io/coronium-ace-docs/server/guide/context/#getplayer

https://develephant.github.io/coronium-ace-docs/server/guide/context/#getotherplayer

https://develephant.github.io/coronium-ace-docs/server/guide/context/#getplayers

If that doesn’t do what it’s supposed to, let me know and I’ll double check it.

I’ll be posting some screencasts tomorrow with some more ‘getting started’ information. Don’t forget you can set msg and action type properties on the state object as well.

Thanks for your help!

-dev

Hi,

I should probably consider renaming the methods so they are a little more obvious.  :wink:

-dev

Hi dev,
Thank you it works fine with getPlayer()
Indeed, the method name is not obvious and I was not sure what the player_id was and what was the method name to get it. Anyway, the docs are clear.

Hi,

The following methods can be used to get the player id:

https://develephant.github.io/coronium-ace-docs/server/guide/context/#getplayer

https://develephant.github.io/coronium-ace-docs/server/guide/context/#getotherplayer

https://develephant.github.io/coronium-ace-docs/server/guide/context/#getplayers

If that doesn’t do what it’s supposed to, let me know and I’ll double check it.

I’ll be posting some screencasts tomorrow with some more ‘getting started’ information. Don’t forget you can set msg and action type properties on the state object as well.

Thanks for your help!

-dev

Hi,

I should probably consider renaming the methods so they are a little more obvious.  :wink:

-dev

Hi dev,
Thank you it works fine with getPlayer()
Indeed, the method name is not obvious and I was not sure what the player_id was and what was the method name to get it. Anyway, the docs are clear.