• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Handy Maxscript for effects...

nickw

Administrator
Staff member
Messages
694
Country
ireland
So, you all know that placing hundreds of lights using attachpoints in GMAX is a nightmare right.... ? Not any more...

First, draw boxes everywhere you want the attachpoints to be. Do not rename from the default Box01 Box02 etc. Also, make sure to convert to an editable Mesh.

Now... here is the cool bit... Download the attached script....

That script, when placed in a new MaxScript and evaluated will take every object named "box*" (so box01, box02, box03, etc.), rename it to an incremented attach point name, put in the correct XML blob, with the incremented attach point name, and in this case, give them all the effect of fx_obslight.

Be careful though, you have to use it only once (or redefine your starting number "strAttachNumber = 0"). Because if you have two "attachPoint_RedLight1" in your scene, only one of them will show up.

What you can do is just change "strAttachNumber = 0" to be one greater than the highest attach point number in your scene, and then run it again with another batch of boxes.
 

Attachments

  • EffectMultipleBoxes.ms
    620 bytes · Views: 1,501
Last edited:

Horst18519

Moderator
Resource contributor
Messages
2,370
Country
germany
This seems to be a very good thing, Nick. :) Although I place all my effects by hand via XML I think this can save a lot of time working with the attach-method. :)
 
Messages
103
Country
belgium
Thanks a lot Nick. This is indeed very handy, because placing effects one byb one, is a very time-consuming job...
 
Messages
172
Country
netherlands
ah just read the post, looks interesting! Will use it sometime! Though what is the advantage of using effects over scenery lights for say, taxilights or lining the runway or so? Dunno what would affect FR more, though effects can be dimmed and scenery lights cant, to the best of my knowledge, but tell me if im wrong :eek: !

The tool would definately save time rather than doing them by hand :D !
 
Messages
18
Country
us-washington
Wait until you see the new tool....

I've done a lot of work on the attach point tool to make it much, much easier to use. The FSX SDK (and subsequent refreshes) will make that available.

Basically just select your model and then it's point and click functionality from there. There will be an SDK refresh coincident with our release that will include some bug fixes and also (hopefully!) include all of the Gmax functionality.

So, you all know that placing hundreds of lights using attachpoints in GMAX is a nightmare right.... ? Not any more...

First, draw boxes everywhere you want the attachpoints to be. Do not rename from the default Box01 Box02 etc. Also, make sure to convert to an editable Mesh.

Now... here is the cool bit... Download the attached script....

That script, when placed in a new MaxScript and evaluated will take every object named "box*" (so box01, box02, box03, etc.), rename it to an incremented attach point name, put in the correct XML blob, with the incremented attach point name, and in this case, give them all the effect of fx_obslight.

Be careful though, you have to use it only once (or redefine your starting number "strAttachNumber = 0"). Because if you have two "attachPoint_RedLight1" in your scene, only one of them will show up.

What you can do is just change "strAttachNumber = 0" to be one greater than the highest attach point number in your scene, and then run it again with another batch of boxes.
 

nickw

Administrator
Staff member
Messages
694
Country
ireland
Hey Adrian! Welcome to the forums! Really great to see you here I am sure all will agree!

Cannot wait to see the new tool! Thanks for the update!
 
Messages
70
Country
us-southcarolina
I've done a lot of work on the attach point tool to make it much, much easier to use. The FSX SDK (and subsequent refreshes) will make that available.

Basically just select your model and then it's point and click functionality from there. There will be an SDK refresh coincident with our release that will include some bug fixes and also (hopefully!) include all of the Gmax functionality.

Awesome!!!!! Great to see you Adrian!

Best,

Owen
 
Messages
8
Country
australia
Here's a version of Nick's maxscript that works with the FSX gmax gamepack if anyone's interested.

Mat
 

Attachments

  • EffectMultipleBoxesFSX.zip
    444 bytes · Views: 771
Messages
49
Country
us-alaska
I have One Very important Question...

somehow this script turned my entire model into a MASS of blinking red lights

nothing left of the model i see in gmax.

HOW do you undo the attachments and return the regular properties of the model.
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
I have One Very important Question...

somehow this script turned my entire model into a MASS of blinking red lights

nothing left of the model i see in gmax.

HOW do you undo the attachments and return the regular properties of the model.

Evidently you have a lot of objects in your scene named "Box01 Box02 etc." The script looks for ANY object in the scene with the root name "Box..." so if you have a building object named "Box..." it will also be converted to a light!!!

You MUST tidy up your scene by giving stuff meaningful names if you want to use this script... :)

Don't Save it and then, Open the saved version of the scene... :rolleyes:
 
Last edited:

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
and how do you change what light effect you want to use before
executing the script?

Load the script in notepad.exe and edit the effect name:

effectName=\"fx_navwhih\"

Then save the edited script... :cool:
 
Messages
49
Country
us-alaska
is there a possible means to make the script behave like *attachTool script

were it only affects the items [selected]

maybe isolate the specific paragraph from *attachTool script

and paste that into the multiple boxes maxscript file.

do any of you know exactly witch paragraph to copy?

make it more *user friendly :)
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
is there a possible means to make the script behave like *attachTool script
were it only affects the items [selected]
maybe isolate the specific paragraph from *attachTool script
and paste that into the multiple boxes maxscript file.
do any of you know exactly witch paragraph to copy?
make it more *user friendly :)

:eek: :confused: That would defeat the purpose of the script! If you want ot do 'em one at a time, just use the Attach Tool...
 
Messages
49
Country
us-alaska
NOT one-at-a-time.

A>> SELECTED CHOICE <<

as oposed to everything in the screen.

the desighn is counterproductive to itself...

you may not have to rename amymore boxes for lights
BUT
you have to now rename every Single box that is not going to be a light!

either way you rename ALOT of boxes.

BUT if you include in the script the paragraph that enables SELECTIVE attachment. you wont have to rename ANY boxes either way!


Do you see now?
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Ah so. Now I understand what you're asking for. I suppose someone who's well versed in script writing could figure that out, but that doesn't include me! I can read and parse scripts well enough, but am not familiar enough to create/modify the code myself...

...aside from which I have no incentive to do so. I'll never need to do this.

However, there IS a script that will auto-rename "selected objects" in a scene, and that could be used to rename your "light objects" to something unique, in which case you'd simply need to edit this script to use that "unique name" instead of "Box.." ;)
 
Messages
40
Hi sorry for this noobish question but..how do I use this script? Will be grateful to whoever helps me!
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Hi sorry for this noobish question but..how do I use this script? Will be grateful to whoever helps me!

What part of Nick's instructions in the first message wasn't clear? :confused:
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
The only thing Nick did not mention is that you have to click the MAXScript menu in GMax and then select "Run script", after which you can browse for the script file. But those menu names are quite obvious :D.
 
Top