Sukosu
11-25-2009, 04:10 PM
Hey everyone, I have been a bit of a lurker on CG society so apologese if no one knows me.
As part of a university assignment I am rigging the old school ariel hunter killer seen in terminator 1 and 2.
From a rigging perspective this isnt exactly a hard vehicle to rig, simple IK and FK solutions, look at constraints and some particle emitters to make it all fancy.
But what I would like to do is make it more complicated. I have started to learn basic max script, and in conjunction with the reaction manager I would like to develop a flight interface of sorts to control the HK.
My problem at the moment (one of many) is that I cannot update the custom attributes rollout bar I have made without resetting the links that have been created in the reaction manager. Which causes several headaches when I want to try out a new spinner or slider, or piece of script.
Below I have pasted in what script I have currently been able to make.
So far I have got the leg sliders linked with the dummies in the scene that move the IK solvers, what Id like to be able to do is make changes to the script and the rollout without having to relink everything in the reaction manager again.
I have so far managed to create a button that could achieve this but every time I try it, I just get an error.
Any input would be greatly appreciated.
Regards
Chris
ca=attributes HKInterface
(
parameters params rollout:HKbox
(
AllLegs type:#float ui:Leg
RearLeftLeg type:#float ui:Leg1
FrontLeftLeg type:#float ui:Leg2
RearRightLeg type:#float ui:Leg3
FrontRightLeg type:#float ui:Leg4
Yaw type:#float ui:yaw
Pitch type:#float ui:Pitch
)
rollout HKbox "HK Interface"
(
local range=[0,100,0]
slider Leg "All Legs" width: 150 align:#left
slider Leg1 "Rear Left Leg" width: 150 align:#left
slider Leg2 "Front Left Leg" width: 150 align:#left
slider Leg3 "Rear Right Leg" width: 150 align:#left
slider Leg4 "Front Right Leg" width: 150 align:#left
slider Jet "All Jets" width: 150 align:#left
slider Jet1 "Left Jet" width: 150 align:#left
slider Jet2 "Right Jet" width: 150 align:#left
slider Height "Height" width: 150 align:#left
spinner yaw "Yaw" range:[0,360,180] align:#center offset:[0,0]
spinner Pitch "Pitch" range:[0,360,180] align:#center offset:[0,0]
Button Fire "Fire Plasma Gun" width: 150 height: 25
radiobuttons SL "Search Lights" labels:#("on","off")
Button Reload "Reload Rollout" width: 150 height: 25
on Reload pressed do
(
custAttributes.redefine old_def new_def_string -- redefine it
)
)
)
custAttributes.add $.modifiers[1] ca
As part of a university assignment I am rigging the old school ariel hunter killer seen in terminator 1 and 2.
From a rigging perspective this isnt exactly a hard vehicle to rig, simple IK and FK solutions, look at constraints and some particle emitters to make it all fancy.
But what I would like to do is make it more complicated. I have started to learn basic max script, and in conjunction with the reaction manager I would like to develop a flight interface of sorts to control the HK.
My problem at the moment (one of many) is that I cannot update the custom attributes rollout bar I have made without resetting the links that have been created in the reaction manager. Which causes several headaches when I want to try out a new spinner or slider, or piece of script.
Below I have pasted in what script I have currently been able to make.
So far I have got the leg sliders linked with the dummies in the scene that move the IK solvers, what Id like to be able to do is make changes to the script and the rollout without having to relink everything in the reaction manager again.
I have so far managed to create a button that could achieve this but every time I try it, I just get an error.
Any input would be greatly appreciated.
Regards
Chris
ca=attributes HKInterface
(
parameters params rollout:HKbox
(
AllLegs type:#float ui:Leg
RearLeftLeg type:#float ui:Leg1
FrontLeftLeg type:#float ui:Leg2
RearRightLeg type:#float ui:Leg3
FrontRightLeg type:#float ui:Leg4
Yaw type:#float ui:yaw
Pitch type:#float ui:Pitch
)
rollout HKbox "HK Interface"
(
local range=[0,100,0]
slider Leg "All Legs" width: 150 align:#left
slider Leg1 "Rear Left Leg" width: 150 align:#left
slider Leg2 "Front Left Leg" width: 150 align:#left
slider Leg3 "Rear Right Leg" width: 150 align:#left
slider Leg4 "Front Right Leg" width: 150 align:#left
slider Jet "All Jets" width: 150 align:#left
slider Jet1 "Left Jet" width: 150 align:#left
slider Jet2 "Right Jet" width: 150 align:#left
slider Height "Height" width: 150 align:#left
spinner yaw "Yaw" range:[0,360,180] align:#center offset:[0,0]
spinner Pitch "Pitch" range:[0,360,180] align:#center offset:[0,0]
Button Fire "Fire Plasma Gun" width: 150 height: 25
radiobuttons SL "Search Lights" labels:#("on","off")
Button Reload "Reload Rollout" width: 150 height: 25
on Reload pressed do
(
custAttributes.redefine old_def new_def_string -- redefine it
)
)
)
custAttributes.add $.modifiers[1] ca
