Script Help - I Can't Be the First to Think of This Idea...

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
User avatar
dbfunky
Posts: 2
Joined: Sat Jan 06, 2007 12:25 pm

Script Help - I Can't Be the First to Think of This Idea...

Post by dbfunky »

While I'm still poking around, I'll likely take my 3rd tour on the G-Force Premium train... Or, is it my fourth? Either way GF has come a LONG way since the last go 'round.

Maybe I'm just old and forgetful, but I'm way lost with the scripting and would appreciate your help, as surely someone's already doing something like this:

Right now, my very dear friends perform in a band that projects imagery from a laptop. 100s of video files playing at random (via WinAmp). The clips are approximately 10 to 30 seconds long.

My Mission: Script GF to play a random favorite config (for around 10 to 30 seconds), followed by a random video clip (full-screen, with no G-Force FX)... Then, when the video clip finishes, run another G-Force config... and another video clip... and so on.

Is that as simple as it sounds? Who might bless us by sharing such a wonderful script?

User avatar
chkman
Posts: 329
Joined: Mon Aug 08, 2005 12:36 pm
Location: Greensburg, PA

Post by chkman »

What you want is sorta possible. I have created a script but it's expecting each video to be 30 seconds. If shorter there will be blank time. But it will pick each one at random and use the random slideshows built into G-Force.

The other consideration is what colormap to use. With this script the video will be in whatever colormap was just chosen at random. You might want to create a monochrome (black and white) colormap, easy to do, and put it in the script just before the StartRandomSprite.

You will need to have QuickTime installed to show a video in G-Force. I was just trying it with some AVI files. I don't think QT supports MPG files.

To keep G-Force from showing photos you must delete all the JPGs from the Sprites folder. BUT DO NOT delete (default).txt or no sprites will show. The AVIs can be moved into this folder or use the toolbar to set the "External" folder to where the AVIs are.

Here is the script (call it "CTRL A.txt"):

Code: Select all

//Start out in "G-Force mode"

//Shut off any sprites
KillRunningSprites();
//Keep sprites from starting up
SetSlideShow( CONFIG_SPRITE , false );
//Get all random slideshows going except for sprites
SetSlideShow( CONFIG_WAVESHAPE | CONFIG_COLORMAP | CONFIG_FLOWFIELD | CONFIG_PARTICLE, true );

//after 30 seconds switch to videos

00:00:30
//Stop particles
KillRunningParticles();
// Stop the slideshows
SetSlideShow( CONFIG_WAVESHAPE | CONFIG_COLORMAP | CONFIG_FLOWFIELD | CONFIG_PARTICLE, false );
// Get the nothing wave going to prevent G-Stuff from happening
SetWaveShape("(chk_nothing)",0);
// Start a random video - remember all JPGs must be removed from sprites folder
// All videos must be in the sprites folder
StartRandomSprite();

//after 30 seconds of video restart script which will start in G-Force mode

00:01:00
// make "CTRL A" match the name of the script if other than CTRL A.txt
Run( "CTRL A" );
And you'll need to save this wave to the Waveshapes folder (call it "(chk_nothing).txt"):

Code: Select all

/*
	A nothing wave for viewing of the sprite images
*/

X0="-1"
Y0="-1"
LWdt=" 0"
Pen=" 0"
Meta="reactive=4 detail=4 density=4 morphable=4"
Vers=270
As I said, each video should be 30 seconds long and do you want to control which colormap is used or just use whatever is current? You can write a script to correspond to the length of each video but then you can't let G-Force pick them at random. They must be called specifically in the script and will be the same each time the script is run, although the G-Forces stuff will still be at random. You could, of course, create multiple scripts, each with videos in a different order. Let me know what you think...

Post Reply