See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: coding help oapiSetTexture  (Read 1286 times)

0 Members and 1 Guest are viewing this topic.

Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
06 November 2007, 14:35:09
I am working on finishing my Lost in Space chariot with B9 robot.  I want the mouth to go red and then back to clear when the
robot speaks "Danger Will Robinson"

With help I have gotten the mouth to turn red but not gotten it back to clear or normal

MESHHANDLE chariot = oapiLoadMeshGlobal ("charrobot1c");
SURFHANDLE red_tex= oapiLoadTexture ("robotmouthred.dds");

VISHANDLE MainExternalMeshVisual = 0;

if (MainExternalMeshVisual != 0) oapiSetTexture (MainExternalMeshVisual,5,red_tex);




Any ideas?


« Last Edit: 06 November 2007, 16:46:30 by gattico »

Offline Urwumpe

  • Sr. Member
  • ****
  • Posts: 427
  • Karma: 0
Reply #1 - 06 November 2007, 16:46:30
In clbkVisualCreated, you save the existing texture handle to a variable, so you can return to the original texture. The rest
of "why it does not work" is simply  because the code does, what you tell it to do.

« Last Edit: 06 November 2007, 16:46:30 by Urwumpe »