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
Here is a demo .blend file Here is the script Here is a WIP of Tanks 3D (approx. 1 meg) Here is a WIP of Krystal (approx. 4 megs) now with 11 levels
UPDATE
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!
==========================================
Tanks Controls:
=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
=Space fires
+++++++++++++++++++++++++++++++++++++++++
Krystal controls:
+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.
i see what your saying. I guess i’ll change that, but don’t expect a new download anytime soon now that schools out. My dad’s really picky about what goes on in his computer, so yeah…
sorry Social, im kinda using my age as an excuse, but it’s not like i was using it as an argument to get someone to be nice to me or to grab attention.
Looking at your script, it is really good. But I also got a frame rate of 0.3 fps.
C-106: Did you put the script in the bpymodules dir? or did you run as is like itirx did?
Anyway, pretty intersting, I noticed the frame rate increased dramatically once I got rid of the ragdoll. Everything seemed to work just great!
Thanks for this!
Big update! i added a bunch of new functions, fixed a lot of bugs, all but completely overhauled water(), and even included a WIP-yet-still-functional game!
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
Gravity neither
File “/home/deb/3D/blender/.blender/scripts/bpymodules/APBL.py”, line 91, in gravitation
mass1=obj.Mass
AttributeError: Mass
Water it’s funny, floating action is nice, but the diving…??
String works well
Bye and thank you for your effort
Ah the ignore thing i added becuase i needed the tank in Tanks had to be excluded from the explosion…will fix…
and gravity is also an easy fix. Sorry for the bugs