Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Need help with parameter wiring expression
  RSS 2.0 ATOM  

Need help with parameter wiring expression
Rate this thread
 
55987
 
Permlink of this thread  
avatar
  • Total Posts: 95
  • Joined: 09 July 2009 05:10 PM

Hello,

I have 2 custom attribute sliders that effect the x and y rotation of a box ”ParamX and ParamY”. I have a third attribute which is a check box”Pos_1”. My aim is to effect the 2 sliders by clicking the check box.When the check box is off, the sliders should be able to move freely, when the check box is on, the sliders should be locked to the position i determin.

I am using the wire parameters by controling the sliders using the check box. I have written the expression “if (Pos_1 == true) then (ParamX == 90)” and i get the following error ”unable to convert:undefined to type:Float

I think i’m going down the right road but am getting something slightly wrong. Can anyone help me with this?

Thanks



Andy Mac Attack POW
Work Computer - Max 2011, Core i7 3.6, 6GB RAM, ATI FireGL V7700 512MB, Windows 7 64bit
Home Computer -BBC Electron with tape player and a copy of creepy cave

Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14445
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

ParamX.value = 90, assuming “ParamX” is the actual slider object.

But I’m unsure whether if/then constructs are permissible in expressions. Expressions are basically calculations, not scripts. Look up “expression techniques” in the main Max help.

If that is being done in a rollout of some kind then it should work.



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 1
/userdata/avatar/fkdsu677m_h4_a2.jpg

Thanks Steve. Is it possible to attach a script to the Pos_1 button?

Author: Andy Mac

Replied: 19 May 2011 02:23 AM  
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14445
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

Assuming Pos_1 is the name of the button then

on Pos_1 pressed do ( stuff here )

should do it. Needs to be after the button definition but still within the rollout definition.



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 0