diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2011-02-18 13:10:48 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2011-02-18 13:10:48 +0300 |
commit | 11e3b6b0b5e107a5aa765c3d5a814f304ca3dafa (patch) | |
tree | ecf069b371a90ca3d0e59a8cb9bb203566283203 /source/gameengine/Expressions/InputParser.h | |
parent | 708df39935adfcfc35c6996133f8e5ea1912f4df (diff) |
BGE Expressions: convert "\n" to real \n
example of usage:
0) Game Properties: text (String) and log (Boolean=True)
1) Keyboard Sensor set to AllKeys with log as logging and text as Target
2) Expression Controller: text=="quit\n"
3) Game Actuator: Quit Game
[1] <-> [2] <-> [3] .:. this will quit the game when you write quit + Enter
4) Keyboard Sensor: set to Return
5) And Controller
6) Property Actuator: Assign text property to ""
[4] <-> [5] <-> [6] .:. this will reset the string everytime you press Enter
# # # # # # # # # # # # # # # # # # # # # # #
Since the change is in the InputParser.cpp it actually affects all the text
input fields in the Logic Editor. So for instance you can use it in the
assign Property Actuator.
# # # # # # # # # # # # # # # # # # # # # # #
Connect an expression controller: text="idclip\n" with an actuator to disable
the Collision of your walls and you can re-create Doom with only Logic Bricks (:
Diffstat (limited to 'source/gameengine/Expressions/InputParser.h')
-rw-r--r-- | source/gameengine/Expressions/InputParser.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/gameengine/Expressions/InputParser.h b/source/gameengine/Expressions/InputParser.h index b640d4eedc7..4c47677034b 100644 --- a/source/gameengine/Expressions/InputParser.h +++ b/source/gameengine/Expressions/InputParser.h @@ -93,6 +93,7 @@ private: void DigRep(); void CharRep(); void GrabString(int start); + void GrabRealString(int start); void NextSym(); #if 0 /* not used yet */ int MakeInt(); |