Modding, Mission Design, and Coding > The Scripting Workshop
3d shield gauges wip
(1/1)
Nuke:
ok, ive wanted to do my own shield gauges (as well as many others) for awhile now. i figured id use :renderTechModel() for the ship icon, and overlay some bitmaps on top of them for the sections. but then i got the idea to create a shield sphere in max, actually i made 4 pof files one for each segment. a simple shp.tbm and the models were required, and ive got them to render on the hud. for the segment intensity i made an animated texture with 16 frames, each with a different alpha intensity and made an eff to go with it. a very basic function to draw the ship and the sphere. however i need a way to specify which animation frame to use. ive added a vp with all the graphics. stick this function in game init and call shieldgauge(shipobject) from the hud. it just animates all the frames right now. eventually i want it to act just like the standard gauge.
--- Code: ---shieldgauge = function(player)
local fu = io.getMouseX() * 0.09765625
local fv = io.getMouseY() * 0.13020833333333333333333333333333
player.Class:renderTechModel(700,550,1000,750,fu,fv,0,11)
tb.ShipClasses["fshield"]:renderTechModel(700,550,1000,750,fu,fv,0,20)
tb.ShipClasses["bshield"]:renderTechModel(700,550,1000,750,fu,fv,0,20)
tb.ShipClasses["lshield"]:renderTechModel(700,550,1000,750,fu,fv,0,20)
tb.ShipClasses["rshield"]:renderTechModel(700,550,1000,750,fu,fv,0,20)
end
--- End code ---
[attachment deleted by admin]
Navigation
[0] Message Index
Go to full version