diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-04 11:42:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-04 11:42:03 +0400 |
commit | cf6ed235784c6b5658fe53a2e52199ac87263b5c (patch) | |
tree | 7387d59ed1613be0cecdaf503b632ade48c0e9de /release | |
parent | 06fe5deaecc0dff672fd778175fbf4127ae04785 (diff) |
BGE small fixes
- script template use new property syntax
- Python could set the axis/hat to a negative index and crash blender (nobody complained)
- Servo control UI had overlapping text
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/scripttemplate_gamelogic.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/release/scripts/scripttemplate_gamelogic.py b/release/scripts/scripttemplate_gamelogic.py index 8711783a5f8..577847c0dda 100644 --- a/release/scripts/scripttemplate_gamelogic.py +++ b/release/scripts/scripttemplate_gamelogic.py @@ -1,7 +1,7 @@ #!BPY """ Name: 'GameLogic Example' -Blender: 245 +Blender: 249 Group: 'ScriptTemplate' Tooltip: 'Script template with examples of how to use game logic' """ @@ -82,10 +82,10 @@ def main(): actu_collide = cont.sensors['collision_sens'] for ob in actu_collide.objectHitList: # Check to see the object has this property - if hasattr(ob, 'life'): - own.life += ob.life - ob.life = 0 - print own.life + if ob.has_key('life'): + own['life'] += ob['life'] + ob['life'] = 0 + print own['life'] """ main() |