player

player

assignedplayer

Details

Kode wheel segment Objects
Style Object set
Modifiers  None
Primarily WHEN/DO Both
Pre-made brains that use it None

Objects >player

Description

This tile references objects that are deemed to be “players”. It is actually an object set rather than an object variable, as it can detect multiple “player” objects. A player object is one that contains control tiles (such as A and Y on a controller, or Space and 2 on a keyboard). It does not necessarily refer to the object the game-player is in control of. Some of the standard props use player as if it is the hero character, such as the detecting scripts in sign posts.

WHEN [detect][player] DO [say][text:create a message][as text box]

If you place a signpost next to an object with control kodes in, that is not your hero, you can get unwanted results, such as the message constantly displaying. Enemies that have kode to attack players also can get distracted by objects with control kodes in them, and will attack them – sometimes these objects are invisible so they look as if they are attacking thin air.

You can fix this by using IWP (In-world picker) instead of player, or create a global object variable that refers to your hero and use that.

Example Code

WHEN [detect][player] DO [say][text:create a message][as text box]

or

WHEN DO [player][hologram] 1

Modifiers

None

Other Uses

None

See tutorials The player tile by Seris Taclys

Solving problems caused by the Player Tile by LadylexUK


Footnotes:

  1. Note:this line of kode will affect all player objects in your game. Remember [player] is an object set, not a single object

Comments are closed.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: