Skip to content

CreateNetPlayer

Claude edited this page Oct 26, 2026 · 5 revisions

CreateNetPlayer

Command Index · BlitzBasic · Multiplayer

CreateNetPlayer name$  ; returns Int

Works in: Blitz2D, BlitzPlus, Blitz3D

Creates a player that belongs to this program and tells the other programs about it, who see it as a message of type 100. Players are what messages are sent from and to.

If HostNetGame("my game") = 2
	me = CreateNetPlayer("Alice")
	Print NetPlayerName$(me)
EndIf
Parameter Type Default Description
name String required The name of the player.

Returns: A player number, or 0 when there is no game.

Related commands

Command Index · BlitzBasic · Multiplayer

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally