Jump to content
Sign in to follow this  
arno

FS2004 SDK... Makin' like a windsock

Recommended Posts

Guest moomox

Hi Guys,I have built a model in GMAX that I would like to rotate with wind direction. Any idea if there is a way to do this with the new fs2004 gmax sdk?Thanks a bunch

Share this post


Link to post
Share on other sites

Still not possible directly from GMax. You need to get the source files and manually tweak is as before.Getting the source files is a bit more difficult now, you need to install MDLCommander to get them.If you have also used animations etc in your object you can not compile the source file with the old BGLC, as it does not know all the new commands, so you will have to include those new commands as well.Maybe this post by Dick helps you a bit:http://www.scenerydesign.org/modules.php?n...viewtopic&t=308


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi moomox.The EffectsHouse.zip pointed to in the thread Arno shows contains a program called BGLC_9.exe that should compile both old and new BGLC commands. So it should be able to compile tweaked ASM code that allows you to turn the windsock... and any animations that use FS9 code should also be compiled ( I hope ).http://www.flatface.net/~rhumba/Zips/EffectHouse.zipAlso, check out Arno's website for BGLC tweaking in general.http://www.scenerydesign.orgDick

Share this post


Link to post
Share on other sites
Guest moomox

Is it me or does the code look completely different in fs2004? I've been looking at the tutorial for fs2002, but the asm code output seems a whole lot different now. I'm still looking for more specifics on making an object behave like a windsock if anyone out there knows.ThanksDavid

Share this post


Link to post
Share on other sites

Hi David.I'm going to assume you are intercepting the ASM code with MDLCommander, and you have obtained a copy of BGLC_9.exe from the above zip file.Somewhere in your *_0.asm code, there is a something like this:; NonAlphaNewCube_NonAlpha label BGLCODE BGL_CALL_32 NewCube_MasterScale_1 ; Node 1 - MasterScale BGL_END BGL_RETURNChange it to this:; NonAlphaNewCube_NonAlpha label BGLCODE; BGL_CALL_32 NewCube_MasterScale_1 ; Node 1 - MasterScale POINT_VICALL NewCube_MasterScale_1, 0, 0, 0, 0, 0, 0, 0, 0, global_winds_surface_direction BGL_END BGL_RETURNThat should get you an object that is placed acording to the wind. If you try to change the wind, it doesn't want to change with it. You need to change the wind, exit the sim, then restart the sim... and the new direction will work. I'm not surprised, as this is how all scenery changes work in FS9. :(Windsocks do change without exiting the sim, so there still may be hope.But the above code will place the object 1 time according to the wind.Maybe Arno knows another trick.Dick

Share this post


Link to post
Share on other sites
Guest moomox

That was exactly what I was looking for. Worked like a charm. I have one more question to add if possible. I'm wondering if this rotation should be working with animated objects as well? I've built an animated flag, but with the above command, only the non animated portions of the model are turning to the wind. Any thoughts?Thanks again to everyone!

Share this post


Link to post
Share on other sites

Hi David.I tried to rotate a BGL with animation ( ANIMHOUSE example from MS ), and the animation won't rotate.It seems the animations are tied only to the "refpoint". Unless Arno has a trick here, I don't know if they can be rotated.There is a command:BGL_POINTVI_INDIRECTThat looks like a familiar transform call, but I wouldn't know where to put it, or what to call.So we do need to figure that out.Dick

Share this post


Link to post
Share on other sites

Hi David.I tried to make an object ( a small planar surface ) and attached a library object to it... the MS amusement park. Lot's of animation there. I then tried to rotate this to the wind, but it didn't want to budge at all. I tried another attached object, without animation, and it did work.After thinking on the matter, our old ally SCASM can still place the new objects. So I just tried to rotate the amusement park to the wind, by placing it with SCASM. It works... but again, you need to exit the sim for new wind headings to work. ( And I needed another object placed nearby as usual. I just used a tiny scaled copy at the same refpoint ).Here's the code:; ----------------------------------------; Rotator_Placement_SCASM; ----------------------------------------Header( 1 42.635366001532 42.635366001532 -88.6077971537902 -88.6077971537902 )LatRange( 42.635366001532 42.635366001532 )Area( A 42.630078217574 -88.6077971537902 100 ) PerspectiveCall( :PlaceObject_1 ) Jump( : ):PlaceObject_1 RefPoint( rel :ReturnObject_1 1 42.635366001532 -88.6077971537902 V1= 5000 V2= 2000 ):RotateObject_1 TransformCall( :CallObject_1 000 000 000 0 0 0 0 0 0c74h ) Return:CallObject_1 CallLibObj( 0 5556330d 4a51a612 0f4420a2 1271a935 ):ReturnObject_1 ReturnEndAArea( A 42.635366001532 -88.6077971537902 100 ) PerspectiveCall( :PlaceObject_1 ) Jump( : ):PlaceObject_2 RefPoint( rel :ReturnObject_2 0.001 42.635366001532 -88.6077971537902 V1= 5000 V2= 2000 ):RotateObject_1 TransformCall( :CallObject_2 000 000 000 0 0 0 0 0 0c74h ) Return:CallObject_2 CallLibObj( 0 5556330d 4a51a612 0f4420a2 1271a935 ):ReturnObject_2 ReturnEndAIt doesn't do everything in gmax, but for this sim, thankfully, we can still place any type of Library Object with the old methods.FS10? I think we'll see even more dramatic changes, and I doubt the old placement BGLs will work.Dick

Share this post


Link to post
Share on other sites
Guest moomox

Thanks for the information Dick.I've tried a few things, but still no luck. I guess i'll take a bit of a break from things and come back to them in a couple of weeks. It's unreal how little microsoft will actually tell us how to use the BGL language... someone needs to write a book! ARNO? :D

Share this post


Link to post
Share on other sites

Can add much to what Dick already said at the moment. That is want I would also suggest. I will do some tests to see if I can find something.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...