Skip to content

CreateNetPlayer

Claude edited this page Oct 27, 2026 · 7 revisions

CreateNetPlayer

Command Index · BlitzBasic · Multiplayer

Command Syntax

CreateNetPlayer:Int32 name:String

Description

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.

Parameters

Parameter Type Default Description
name String required The name of the player.

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

Examples

If HostNetGame("my game") = 2
	me = CreateNetPlayer("Alice")
	Print NetPlayerName$(me)
EndIf

Related Commands

Command Index · BlitzBasic · Multiplayer

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally