Skip to content

CreateNetPlayer

Narta Xaymar Dirks edited this page Nov 25, 2026 · 7 revisions

CreateNetPlayer BlitzBasic

CreateNetPlayer:Int32 name:String
Parameter Mode Type Default Description
name In String required The name of the player.

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

Description

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.

Examples

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

Related Commands

DeleteNetPlayer BlitzBasic, HostNetGame BlitzBasic, JoinNetGame BlitzBasic, NetMsgData BlitzBasic, NetMsgFrom BlitzBasic, NetMsgTo BlitzBasic, NetPlayerLocal BlitzBasic, NetPlayerName BlitzBasic

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally