Is there any possible way to learn scripts without getting a programming degree??

Ok i’m annoyws now, because blender artist forums cannot answer this simple question, even google can’t anyswer this question, yet i see post all over everywhere by people who obviously know how its done, its frustrating!

How do you use scripts?

Yes i searched and read the answers on here:

  • The script is in my “scripts” folder in the documents and settings folder.
  • I have restarted blender, it is not in the scripts section (and import doesn’t work)
  • I have tried copy+pasting it into a new text file in the blender scene, and pressing ALT+P, it makes the console say “no module named: GameLogic” (???)
  • I have tried forum searching and found the above hints, and also MAC queries of a similar nature (but not valid as is MAC)
  • Everything else seems to reference the phython script system that you must install to get blender working, but its blender scripting tutorials i’m after!
  • I tried that “bookmarks” list from the main website but half of its down, the other half is in french!

So hows it work?

Basically i took this script:
http://www.sunjay-varma.com/explosions1
and added it to the txt editor and now pressing alt+p (which does what?) gives the above error.
My scene file:
http://rapidshare.com/files/404485922/untitled.blend.html

Anyone that thinks it sounds easy, please spill the beans on how it all works!

For the script on that site you don’t run Alt+P. It is run in the game engine. See the blends on the site you linked to and this thread http://blenderartists.org/forum/showthread.php?t=187360&highlight=import+gamelogic+error

That doesn’t seem to help, its jsut mentions a “python controller” (which i’ve never heard of), why is it so hard to do anything non-basic in blender?

Ps im using 2.49 of blender.

Knowing nothing about python but reading the instructions on the site.
In the python script change
property =“red” to property = “”
This is the property in the original example that affected object have had given to them but to affect all just leave it blank
Increase the values for
"Strength = "
"range_of_explosion = "
"vertical = "
to get the result you want.
You then run the simulation P and in your example press Space to activate the python script.
Also you may want to change your blocks to Rigid Bodies instead of set to Dynamic so that they have some rotation and look ten times better in an explosion.

ahh that worked! I should have tried testing a little more as i did once noticed the fractional of pauses when i hit the space bar before. The blocks dynamic rigid body thing isn’t something i need to test, and besides they are grouped now so i’d have to go into each one individually and change it’s properties which is a lot of work!

Lucky for me i’ve been making some of these keva structures in bge to amuse myself whilst trying to figure things out, (and seeing if they’d stay up!)

Ahh ok wait a minute i’ve got it working but when i try to put the script in a new file, it lets me put “Explosion.py” in the python box (in the logic bricks) but not in the script section underneath it?

Have you opened the python script in the text window. You can only reference a script it has access to.

It says when i right click the text and select “execute” it says “error, check console”, and its that darn “no module named game logic” again!! :’(

I copy + pasted the text into the new blend file, it just will not let me do it now…

You do not execute the script in the text window.
Make sure you name it the same as the name you put in the scripts box.

Ahah got it working, i’ve got a good sphere of influence here!>>

http://rapidshare.com/files/404574957/KEVA_TESTRUN_1.blend.html
http://i538.photobucket.com/albums/ff349/ChrisCrinx1/vlcsnap-2010-06-29-12h29m09s7.jpg?t=1278106704