Author Topic: Ship viewer  (Read 2341 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Originally written for redmeance, to get shots of ships for the wiki. :)

http://fs2source.warpcore.org/temp/scripting.tbl

Requires very latest CVS, I caught a bug and updated renderTechModel to be better. Clicking (and holding) anywhere on the screen with any of the three mouse keys will change that particular rotation axis. There are also a few hotspots.

Very upper-left: Changes to next ship (Starting ship is Ulysses)
Very lower-left: Quits
Very upper-right: Zooms in
Very lower-right: Zooms out
-C

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Hmm, did this not work, or did everyone just take one look and go back to the lab? :p
-C

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Well the table missed #End line and after the addition it gives an error report if you try to exit the viewer (keeping left mouse button pressed while moving the cursor to lower left corner)...
Code: [Select]
LUA ERROR: [string "GS_STATE_INITIAL_PLAYER_SELECT"]:68: attempt to call global `setState' (a nil value)

LUA Debug:
------------------------------------------------------------------
Name: setState
Name of: global
Function type: C
Defined on: -1
Upvalues: 0

Source: =[C]
Short source: [C]
Current line: -1

And am i also supposed to be able to take screenies with this (didnt get any :()?
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Possibly, they may just go in the clipboard tho.

That function should be "ba.setState"
-C

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
hmm.. correct or the one that worked was 'ba.setEvent'... and yeah screenies work too.. via clipboard.. but as there is no way of controlling the lighting it is pretty hard to use this ship viewer properly...

Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline starfox

  • 28
I'm geeting following error message

Error: scripting.tbl(line 95:
Error: Required token = [#End], found [53, "Primary friendly hits:"] .

File:\fs2_open\code\parse\parselo.cpp
Line: 618
[This filename points to the location of a file on the computer that built this executable]

Call stack:
------------------------------------------------------------------
------------------------------------------------------------------

Something I missed ?
Rig:
A8N-SLI Premium
AMD 64 X2 4200+
GF 7950 GT
X-FI ExtremeMusic
HEC 550W
2 Gt RAM
Win XP

  

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Add #End to the end of the scripting.tbl.. and also change setState to ba.setEvent

EDIT: Or atleast that worked for me...
« Last Edit: January 31, 2006, 03:11:24 am by Wanderer »
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline starfox

  • 28
OK, now I'm getting the following oddity....

LUA ERROR: attempt to call a string value

LUA Debug:
------------------------------------------------------------------
Name:      (null)
Name of:   
Function type:   C
Defined on:   -1
Upvalues:   0

Source:      =[C]
Short source:   [C]
Current line:   -1
------------------------------------------------------------------

LUA Stack:
------------------------------------------------------------------

------------------------------------------------------------------
Rig:
A8N-SLI Premium
AMD 64 X2 4200+
GF 7950 GT
X-FI ExtremeMusic
HEC 550W
2 Gt RAM
Win XP

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
That generally means that a function name used in scripting is invalid (Due to a typo, or a build not supporting it). Try a newer CVS build...current CVS works for me.
-C

 

Offline starfox

  • 28
Strange, I'm using the very latest CVS-Build, fs2_open_r-20060130.
 :confused:

Rig:
A8N-SLI Premium
AMD 64 X2 4200+
GF 7950 GT
X-FI ExtremeMusic
HEC 550W
2 Gt RAM
Win XP

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
I'm using this scripting.tbl... And i get no errors on debug builds and it runs with both builds... with same build as you...
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline starfox

  • 28
Thanks, it works now !
 :)
Rig:
A8N-SLI Premium
AMD 64 X2 4200+
GF 7950 GT
X-FI ExtremeMusic
HEC 550W
2 Gt RAM
Win XP