Privateer GG talking heads

Forum for discussing various mods for the VS-engine based upon Privateer. (Please play nice now, and extinguish all flaming materials.
Sincerely, The Management)
log0

Re: Privateer GG talking heads

Post by log0 »

Updated more complete version. There are a few bits that could be enhanced, like the inheritance relations(comp, launcher and co derived from link).
You do not have the required permissions to view the files attached to this post.
Herr_Koos
Trader
Trader
Posts: 31
Joined: Wed Dec 12, 2012 10:43 am

Re: Privateer GG talking heads

Post by Herr_Koos »

That will help quite a bit, thanks. Question: Does Base.Video work in the VS of 1.03 stable or was it only added later?
Herr_Koos
Trader
Trader
Posts: 31
Joined: Wed Dec 12, 2012 10:43 am

Re: Privateer GG talking heads

Post by Herr_Koos »

And then another thing:

# Add a script object
# Script is executed until object is erased
# room: room id (int)
# index: script id (string)
# pythonfile: script string / filename (string)
# time: delay till/between script execution (float)
Base.RunScript(room, index, pythonfile, time)

What is the purpose of the index/script id argument?
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Privateer GG talking heads

Post by klauss »

Herr_Koos wrote: # Add a script object
# Script is executed until object is erased
# room: room id (int)
# index: script id (string)
# pythonfile: script string / filename (string)
# time: delay till/between script execution (float)
Base.RunScript(room, index, pythonfile, time)

What is the purpose of the index/script id argument?
It's an identifier you have to use when erasing or modifying an element.
Herr_Koos wrote:That will help quite a bit, thanks. Question: Does Base.Video work in the VS of 1.03 stable or was it only added later?
I believe it should, though I could remember wrong.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
log0

Re: Privateer GG talking heads

Post by log0 »

Herr_Koos wrote:And then another thing:

# Add a script object
# Script is executed until object is erased
# room: room id (int)
# index: script id (string)
# pythonfile: script string / filename (string)
# time: delay till/between script execution (float)
Base.RunScript(room, index, pythonfile, time)

What is the purpose of the index/script id argument?
The id is a way to identify/reference an object after its creation.

Simple example:
# Add a texture. Change texture position.
roomid = Base.GetCurRoom()
Base.Texture(roomid, "mypic", "../somepic.texture", 0.0f, 0.0f)
Base.SetTexturePos(roomid, "mypic", 0.5f, 0.0f)

Other example:
# Add a script object that will execute a script every 2 seconds. Erase it after first run.
roomid = Base.GetCurRoom()
scriptid = "myscript"
script = "#\nimport Base\nprint 'bla'\nBase.EraseObj(%(rid)d, %(sid)s)" % {'rid' : roomid, 'sid' : scriptid}
time = 2.0f
Base.RunScript(roomid, scriptid, script, time)
Post Reply