stoneharry

Untitled

May 5th, 2012
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.51 KB | None | 0 0
  1. function ShowScene(self)
  2.     local rnd = random(1,#vx.SceneList);
  3.     if vx.BGTexture[rnd] == "" then
  4.         if VXBGTextureAL then VXBGTextureAL:Hide(); end
  5.         if VXBGTextureCS then VXBGTextureCS:Hide(); end
  6.         if VXBGTextureRW then VXBGTextureRW:Hide(); end
  7.     else
  8.         if VXBGTextureAL then
  9.             VXBGTextureAL:SetTexture(vx.BGTexture[rnd]);
  10.             VXBGTextureAL:Show();
  11.         end
  12.         if VXBGTextureCS then
  13.             VXBGTextureCS:SetTexture(vx.BGTexture[rnd]);
  14.             VXBGTextureCS:Show();
  15.         end
  16.         if VXBGTextureRW then
  17.             VXBGTextureRW:SetTexture(vx.BGTexture[rnd]);
  18.             VXBGTextureRW:Show();
  19.         end
  20.     end
  21.     self:SetModel(vx.SceneList[rnd]);
  22.     self:SetCamera(0);
  23.     self:SetSequence(0);
  24.     PlayGlueAmbience(vx.Ambience[rnd], 4.0);
  25.     PlayLoginMusic();
  26.    
  27.     Mod1:SetModel("Creature\\spirithealer\\SpiritHealer.m2")
  28.    
  29. end
  30.  
  31. if Mod1 == nil then
  32.     Mod1 = CreateFrame("Model") -- we are going to render a model
  33.     Mod1:SetCamera(0)
  34.     Mod1:SetPoint("CENTER",0,0) -- start in middle of screen
  35.     Mod1:SetFrameStrata("MEDIUM")
  36.     Mod1:SetFrameLevel(3)
  37.     Mod1:SetLight(1,0,0,-0.5,-0.5,0.7,1.0,1.0,1.0,0.8,1.0,1.0,0.8); -- otherwise it won't show
  38.     local x,y,z = Mod1:GetPosition()
  39.     Mod1:SetPosition(x-0.1,y-0.1,z+6.5); -- move it right + up a bit
  40.     Mod1:SetFacing(Mod1:GetFacing()-0.3);  -- rotation -- turn it so it faces more left
  41.     Mod1:SetModelScale(Mod1:GetModelScale()/12);  -- scale -- make it smaller
  42.     Mod1:SetAlpha(Mod1:GetAlpha()/1);  -- alpha -- not sure what this does
  43.         --Mod1:SetWidth(x) -- can set width/height of model
  44.         --Mod1:SetHeight(x)
  45. end
Advertisement
Add Comment
Please, Sign In to add comment