Hi guys. I’m from the next door forum, python scripting, so I guess this’s my first post here. I’m also a rookie with the engine, and I’m having a lot of troubles with that. I 'd enumerate, but I’ll just tell the thing I’m doing: a CD-player :Z
Well. I’ve an object with a property: ‘song’. Then, simplyfing, I can define a AND controller, link to a CD actuator for playing 1 song, and for example, a Keyboard sensor. All runs OK when I press space, it’s wonderful!
But I want to use the property (remember, ‘song’) for playing any song. So I create this script:
Then a bizarre thing occurs: Not only the sensor detects twice (if I add a ‘print’ line to the code, it appears twice), but worst: the CD goes crazy, it tries to start the song EVERY FRAME, and as a result it sounds th-th-th-th-th…
hello,
it seems to me that use the cd actuator is realy unstable if you use scripting with it, but i made this withourt using anny script, mehbe it can help you
(Sorry por the pause )
Yeah, it’s totally clear. Thanks to all.
But now I’ve considered my work completed, and there’re some troubles i can’t understand. Let’s see:
The program is a MusicCD menu for a musical group. It has a tracks window, and a videos one. There’s also a web launcher option, to go to the web site.
For both the web and the video options, I wrote a couple of scripts. They invoque to ‘os’ library and make os.startfile(filepath), which launches the file as it was double-clicked.
Well, all works perfectly in the blender environment, but as always, the problems appear when made the standalone.
-I know external python lybraries can´t be used, but os works… almost. It u click on an option that uses such scripts (“Visit the web” or “watch videoclip”) in a computer without Python, it makes a console error (I can’t remember which, sorry) but just THE FIRST TIME!. The second click works fine!
-The other hard problem is about win98: it doesn’t work at all. It says that it isn’t a valid win32 appl. (Maybe because it has been created with w2000?)
I hope some help from you, please… I offered to make this program for the musicians for nothing, just like a Blender defender… :Z telling them: WATCH wath blender can do! AND I HAVE TO FINISH IT as soon…!