The All Purpose Blender GE Library is a script I made that simplifies the game programmers life. It is very simple to implement and reduces lines and lines of code into a few function calls. Remember to put the script in C:/Program Files/Blender/.blender/scripts/bpymodules
6-16-07: added water()
7-02-07: updated demo, script, Tanks
7-16-07: added mouse functions (mouseMove(),mouseLook(),etc) and more; Tanks and Krystal update
Please ask if you have any questions!
=Arrows control bottom part of tank
=ASWD control top part
=FGTH make top part turn slower than ASWD
=1,2 switch cameras
=Numpad 1,2 switch weapons
= +,- increase/decrease firing power
+mouse moves blue circle cursor thing
+left MB sends repulse beam
+right MB sends attract beam
+space stretches blue circle cursor thing (to act as platform for falling blocks)
GOAL: to get the green glowing icosphere (the krystal) into the blue basket. Cursor does have collision detection. Green blocks are not active; other colored blocks are activated by colored buttons, which are activated by touching it with a grey block. If a grey block touches the green circle below the pieces, the scene restarts. The blocks are destroyed if they touch the basket or the ground below the green circle, which is (usually) a good thing. Ask if you need any hints or help.
The little scripts per object are function calls to the bigger script stored in .scripts for blender, correct?
The bigger script (APBL.py) is stored in C:\ … \ .blender\scripts\bpymodules. Sorry for that confusion.
The only reason the framerate should be down is because there’s so many things on one scene.
If it’s still not working, check the module (the DOS window that opens when you start blender), and tell me if it’s spitting out an error. Like it might say ‘NameError in APBL.py on line 96: blah…’
But it doesnt work? The arms are still stuck below the plane, with hands sitting on top?
Did you turn the property collBuff on the ground plane to True?
EDIT: My mistake:
If it’s still not working, check the module (the DOS window that opens when you start blender)…
it’s not called the module its the console. My bad.
yeah now i just need to think of more, but now that schools out it’ll be a lot easier. Some of them i created specifically for the script but most of them i had already written long before.
If anyone has any ideas feel free to present them!
PS i don’t have any plans of making them for stuff other than the GE (animating, modeling, texturing, etc), because i’m not that good at animating or that stuff any way. Maybe once i start getting better in those areas i will but don’t count on it…
Social: Did you download the demo? or just look at the script? I just want to know what effort exactly i’m being credited for…
I looked at the script - I assume that the demo simply implements the same functions. Good effort generally.
That said, there is some stuff in there that I just find downright silly. The OnOff() for example. Defining a new function here just seems unnecessary to me.
I mean if you have a situation where you really have to activate/deactivate actuators more then a few times, just set an assignment:
“ActiveAct = GameLogic.addActiveActuator” then just call via “ActiveAct(name, state)”.
I don’t know, I guess it’s a matter of personal preference and style, but to me functions are something that should be reserved for summing up tasks of somewhat higher complexity.
Great! Nice functions!
Teleport its nice and works perfectly!
Explosion didn’t work
( File “/home/deb/3D/blender/.blender/scripts/bpymodules/APBL.py”, line 176, in explode
if own.getPhysicsId() != 0 and own not in ignore:
TypeError: iterable argument required
File “/home/deb/3D/blender/.blender/scripts/bpymodules/APBL.py”, line 91, in gravitation
Water it’s funny, floating action is nice, but the diving…??
String works well
Bye and thank you for your effort