Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-06-04 11:42:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-06-04 11:42:03 +0400
commitcf6ed235784c6b5658fe53a2e52199ac87263b5c (patch)
tree7387d59ed1613be0cecdaf503b632ade48c0e9de /release
parent06fe5deaecc0dff672fd778175fbf4127ae04785 (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.py10
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()