利用者:Sculptorjim/Game Engine/Logic/Properties

提供: wiki
< 利用者:Sculptorjim‎ | Game Engine‎ | Logic
2018年6月29日 (金) 04:52時点におけるYamyam (トーク | 投稿記録)による版 (1版 をインポートしました)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索


Introduction to Properties

Properties are the game logic equivalent to variables. They are stored on the object and can be used to represent things about them such as ammo, health, name, and so on.

Property Types

There is five types of properties:

Timer Starts at the property value and count upwards as long as the object exists. It can for example be used if you want to know how long time it takes the player to complete a level.
Float Uses a decimal number as value, can range from -10000.000 to 10000.000. It is useful for precision values.
Integer Uses integers (whole numbers) as value, between -10000 and 10000. Useful for counting things such as ammunition where decimals are unnecessary.
String Takes text as value. Can store 128 characters.
Boolean Boolean variable, has two values true or false. This is useful for things that has only two modes, like a light switch.


Using Properties

Properties can be set up and initialised in the Properties panel of the Logic Editor - see the Property Editing page for details. When a game is running, values of properties are set, manipulated and evaluated using the Property Sensor and the Property Actuator.