Privateer GG talking heads
Re: Privateer GG talking heads
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.
-
- Trader
- Posts: 31
- Joined: Wed Dec 12, 2012 10:43 am
Re: Privateer GG talking heads
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?
-
- Trader
- Posts: 31
- Joined: Wed Dec 12, 2012 10:43 am
Re: Privateer GG talking heads
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?
# 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?
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Privateer GG talking heads
It's an identifier you have to use when erasing or modifying an element.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?
I believe it should, though I could remember wrong.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?
Re: Privateer GG talking heads
The id is a way to identify/reference an object after its creation.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?
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)