Text-based Alice?
Hi!
I'm trying to make some simple 3D visualisations as part of a CS project, and Alice seems like the ideal thing for the job. Except for one thing - I want to program in another language, and let that program generate the input for Alice. Basically, I would like to get rid of that pretty user interface. Is there any way to do that? Ideally I would like my other program (in, say, Perl or Java) to control the actions in the 3D world in real-time, but if I can get that program to generate an Alice program which I later run, that might do. Can I somehow import the code? Or do you have any other suggestions? ________ [URL="http://glasspipes.net/"]GLASS PIPE PICTURES[/URL] ________ [URL="http://www.fucktube.com/"]Videos Pornos[/URL] |
I do recall a user saying that there was a way you could use typed codes. I am not sure what the function is called, but I think it is in the required file for alice.
|
I just checked and I believe the file is one of the three files in the resources folder which is in the required folder.
|
It's called python. I wrote an article about it. Check it out, [URL="http://alice.wikia.com/wiki/Scripting"]here[/URL], on the ALICE WIKI! Join today HINT HINT!
|
Oh! I thought you were using something called jython. I know python! Thanks zonedabone
|
Well
It actualy is Jython but it is virtually the same as python because its only difrence is that it can use java modules.
|
This looks like it could possibly solve my problems, if I can just get it all to work.
The wiki article was very helpful thank you; I've managed to get that much to work after a series of peculiar bugs. But I can't find any more information about it anywhere, and this isn't quite enough. I now know how to change a variable using a script, and how to print things. But what about calling a method from within the script? Typing world.methodname() gives an error. Without parenthesis it gives no error but also doesn't do anything. ________ [URL="http://strainindex.com"]Marijuana indica[/URL] ________ [URL="http://www.dodge-wiki.com/wiki/Dodge_Power_Wagon"]DODGE POWER WAGON HISTORY[/URL] |
[QUOTE=Chuma;19079]This looks like it could possibly solve my problems, if I can just get it all to work.
The wiki article was very helpful thank you; I've managed to get that much to work after a series of peculiar bugs. But I can't find any more information about it anywhere, and this isn't quite enough. I now know how to change a variable using a script, and how to print things. But what about calling a method from within the script? Typing world.methodname() gives an error. Without parenthesis it gives no error but also doesn't do anything.[/QUOTE] Click on "more details" and if it says things like "*starting world*", then scroll to the bottom and read that since it's the debugger and will tell you what's wrong. |
I've looked at that as well, but it didn't make much sense to me. Let's see if it makes sense to you.
The script-defined method reads: def scriptmethod(): world.othermethod() The debugger info says: Error during simulation. Alice version: 2.2 8/01/2009 Throwable that caused the error: Traceback (innermost last): File "edu.cmu.cs.stage3.alice.core.property.ScriptProperty[name=script,owner=edu.cmu.cs.stage3.alice.core.response.ScriptResponse[world.my first method.__Unnamed1__]]", line 1, in ? File "edu.cmu.cs.stage3.alice.core.property.ScriptProperty[name=script,owner=edu.cmu.cs.stage3.alice.core.World[world]]", line 12, in scriptmethod AttributeError: othermethod There's also another small problem: About 90% of the time, when I try to start Alice, it resets the properties file, thus disabling scripting again. Also slightly annoying. ________ [URL="http://www.ford-wiki.com/wiki/Mazda_Millenia"]MAZDA MILLENIA[/URL] ________ [URL="http://xpertinsurance.com/"]EXPERT INSURANCE[/URL] |
Awesome stuff, this is great information! I was looking for such an option. This is going to make Alice much more functional for me.
Any other backdoors we should know about? Thanks. |
All times are GMT -5. The time now is 09:45 AM. |
Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.