Tagged 'ScriptSpot How To'

trouble with lights

I am placing a target light in my scene with a simple maxscript script.

I have set the light "enable" to "on" but the light won't turn on unless
I manually open the modify panel and check the "light type" "on" button.

Would like to do this with maxscript.

Any help would be appreciated.

Attaching objects by list

Hi guys, anyone kindly guide me on how to attach multiple objects to an editable poly, without making a selection in the viewport, but attaching them by list. Any help highly appreciated. thanks

ps. I've gone through previous similar posts but couldn't get a similar scenario.

Distribute grouped objects along edges

hi. I'm stuck at trying to distribute grouped objects along a given objects edges. At first I thought it was similar as with the case of vertices but it turned out to be quite complicated.
Hope I was clear. Anyones help highly appreciated.

do any1 know what do i have to do ?

Hi every one im new here and im a beginner in 3d studio max , so Im asking for your understanding!:) i've copy this script from this video http://vimeo.com/21174115
1frameStart = (animationRange.start as integer / ticksPerFrame)
2frameEnd = 10
3frameEnd = "D:\back up\PHOTOSHOP SC5\export_to_flash"
4fileBase = "PathFinderTest_"
5
6max select all
7 abc = selectior as array
8 clearSelection()
9for f = frameStart to frameEnd do
10(
11 sliderTime = f
12 select abc
13 maxOps.cloneNodes abc offset:[150,0,0] expandHierarchy: true cloneType:#copy actualNodeList:()

How do I Update a script post?

I see no way to update script post that I have submitted, yet I see that people are updating their posts... could some one please show me the way? Could they be to old?

Also I could not find a link to the forms "ScriptSpot How To" So hopefuly this gets to someone, and I can find the answers.

Thanks,

mrapelje

Select object by user defined properties

How to select object by user defined properties?
example:
name = mybox

select $mybox

pick up a name from an object and put the same name in another object

starting to do programming in MaxScript and need to make a script that select an object, copy your name and transfer that name to another object. But I have a problem. I need this script to do this automatically for multiple objects in one

I am trying to make a SIMPLE particle flow script decreasing speed of particles

I am trying to make a simple Particle Flow script decreasing speed of particles. Why this did not work, the variable "vel" is changing? And other important question how to make particles to go on random direction not in single line.

on ChannelsUsed pCont do
(
pCont.useTime = true
pCont.useSpeed = true
)

on Init pCont do
(

)

on Proceed pCont do
(
count = pCont.NumParticles()
speed = .05
t = pCont.particleAge
for i in 1 to count do
(
pCont.particleIndex = i
vel = (speed/t)
print vel
pCont.particleSpeed = [vel,0,0]

)
)

Unable to Apply UVW Map on multiple Selection with simple MaxScript

Hi all,

I've recently created a maxscript to apply a 10x10x5m box UVW Map on objects.
I copied the code from the maxscript listener after applying it manually on an object. Edited some of the information to better organize it in my CUI. The code goes like this

macroScript UVW10x10x5m
category:"1Essential Scripts"
toolTip:"UVW10x10x5m"
Buttontext:"UVW10x10x5m"
 
(
	modPanel.addModToSelection (Uvwmap ()) ui:on
	$.modifiers[#UVW_Map].maptype = 4
	$.modifiers[#UVW_Map].length = 10000
	$.modifiers[#UVW_Map].width = 10000
	$.modifiers[#UVW_Map].height = 5000
)

Run script on screenRedraw

Hi,

Need a bit of help -
Currently my script is updating (looping) on timer, but I'm trying to run the script on screen Redraw.
Managed to set-up Callback system, but not sure how it should call the script.
Is anybody could show a sample of layout that works on callback system?

Thanks