3
$\begingroup$

I have searched about for an actuator that can run external applications within the bge but I haven't found anything. Does such an actuator exist?

In addition, it is possible to launch a web browser within a blender game: A plane with firefox, chrome... in the game

$\endgroup$

1 Answer 1

2
$\begingroup$

This task is fairly simple to do with a Python script.

You could add a python script as a controller to launch a browser:

import subprocess
subprocess.call(['pathToChrome\\chrome.exe',
                 'http://blender.stackexchange.com',
                 'Message'])

enter image description here

To save a screenshot you could use one of the command line capturing tools like:

Once you have the saved screenshot you could manipulate a plane to use the screenshot as a texture see createTexture in Blender API on how to dynamically change a textures image.

$\endgroup$
5
  • $\begingroup$ Hello i have tested your script but without success. In your example i must place the blend file in the chrome's folder? If i want to run movie with vlc by pressing a key it's the same script? thanks $\endgroup$
    – GabrielS
    Commented Nov 14, 2013 at 18:55
  • $\begingroup$ @GabrielS Sorry if I don't get you right, you were asking how to launch an external app, a browser is an external app, thats what the script does. What do you mean by placing the .blend file in chrome's folder? To start VLC it would be the same script (with another path to vlc's .exe and some parameters) $\endgroup$
    – stacker
    Commented Nov 14, 2013 at 21:16
  • $\begingroup$ Ok thanks, i understand what to do with the script. My script look like this: import subprocess subprocess.call(['VLCPortable\VLCPortable.exe']) And when i hit the spacebar vlc is launching. but when i'm closing vlc, the script launch it one more time (but after that no). you have an idea? $\endgroup$
    – GabrielS
    Commented Nov 17, 2013 at 17:58
  • $\begingroup$ @GabrielS Sorry, I couldn't find out why the script is invoked twice, I tried the Tap option in the sensor and some prints in the script. I guess the event must be analyzed closer, but I'm not familiar with this API. You could ask another question on that. $\endgroup$
    – stacker
    Commented Nov 17, 2013 at 18:38
  • $\begingroup$ Ok, thanks i close this question and i post another message about that script $\endgroup$
    – GabrielS
    Commented Nov 18, 2013 at 7:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .