Jump to content
Sign in to follow this  
Guest Regg001

Effects : how to prevent an effect to show in daylight ...

Recommended Posts

Guest Regg001

I'm currently messing with the FX files and trying to setup an effect that will only be visible at night . In FS2002 SDK (SpecialEffects_SDK), they mentionned we can do that by adding some parms using BGLPLACER . I don't know if it worked in FS2002 , but it is not in FS2004 . When i try to add an effect with such parm, the effect does'nt show at all . If i remove the parm (Day=0; ) , then i can see the effect but all the time - including the day.So the question is , how to prevent an effect to show in daylight in FS2004 ?Thanks for your help . See the attach pictures ...

Share this post


Link to post
Share on other sites
Guest Regg001

Looks like i found HOW TO ...Using XML coding i'm able to include EFFECTPARAMS in the EFFECT section. That way it is possible to include a DAY=0 (or 1) parm to remove the effect in daylight..EX:Here's an exemple of what you can do with it and a rotating effect file (see the JPG) .. If you're asking , yes the beam of light is rotating .http://forums.avsim.net/user_files/55722.jpg

Share this post


Link to post
Share on other sites
Guest sapper42

Gday, i tried the effectParams for this beacon and nothing would show.However what i used this parameter the beacon showed at night without problemsi then hadto replicate the location another 2 times for Dawn and Dusk effects, is my coding incorrect in the 1st example or is my second way of doing it the correct way.rgds Jeff

Share this post


Link to post
Share on other sites
Guest Regg001

Yes, i have the same result . It looks to me that with FS9 day and night are paired, and the samething for dusk and dawn . Both can't be mixed in the same effectParams . Don't know if it's a bug or something that has to be that way for additionnal parms or effects.We'l see with the SDK on effects .Can you put a JPEG of your project . I'm curious ..

Share this post


Link to post
Share on other sites
Guest sapper42

Ahaa, paired is not something ive considered as there was no mention of this in the Old SDK and like you said, untill the new SDK is out and one hopes, accruate with good examples and no omission we will haveto wait or struggle through.attached is a jpg of the object i am currently working on.rgds Jeff

Share this post


Link to post
Share on other sites
Guest FR153

It did work in FS2002, I used it.... It doesn't work for me in FS2004 either and I have wasted a whole day trying to trouble shoot it. If you add parameters such as DAY=0; DUSK=1; NIGHT=1; DAWN=1; there is no light beam. If you attempt to make individual files for each one, they all work all the time and you have 4 beams running around the world. I hope someone can explain how to turn it off during the day in FS9... In other words, the parameters are not working. H E L P.Al

Share this post


Link to post
Share on other sites
Guest sapper42

Gday Al. as Reg pointed out you need to duplicate each effect and for the effect parrameters do: DAWN=1;DAY=0;for a copy of the effect do:DUSK=1;NIGHT=1;and you will find it will work, its a royal pain having to do the same eg: beacon twice as its doubleing up the code lenght but its the only way ive managed to get it to work.rgds jeff

Share this post


Link to post
Share on other sites
Guest FR153

Hi Jeff,I see what has to be done but it don't want to seem to work.. This is the code I used and I am using the new FS2004 BGLComp.exe set of files. I have even moved a copy of the 'fx' file into the same directory with the BGLComp and the XML document so that there was no 'travel' involved. When it would not compile by using the mouse, I went in to c: prompt mode and entered it manually... It refuses to compile and gives me: Error C2470: Unrecoverable error parsing XML!Error C2006: Parse failed <0x80004005>Error C2003: Failed to process file: FR153Lightbeam.xmljava script:smilie_remote(':-hmmm')Here is the full set of code that I am using. I have gone over it about a hundred times and still don't see anything wrong. Except for the minor changes, it reads the same as shown in previus threads with Regg. <?xml version="1.0"?> An interesting note.... The sample files do the same thing. I have tried reloading the complete SDK and nothing has changed. I even moved to a different drive, no dice.... Any suggestions? BTW, the light works fine, I just cannot turn it off during the day. BTW#2, I just installed the FS2004 BGLComp after having used the older versions since they came out. The XSD is in the same directory and I do have msxml4 installed also. Thanks,Al

Share this post


Link to post
Share on other sites
Guest sapper42

Gday Al, i think i can see your problem !Look at this line of your codexmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'it should read like thisxmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'your FX files must be in the default Effects folder only.sample of some code i use to display some beacons at Dusk Night and Dawn and they do not show in Daytime !regards Jeff

Share this post


Link to post
Share on other sites
Guest FR153

WOW....Thanks Jeff,I tried your solution and came up with yet another problem (see picture), but working with that concept in mind I did some more work with it and finally got it resolved. Thanks to binary math... It appears that the parameters are grouped, but not quite the way we thought. It appears that DUSK and DAWN are a pair as are NIGHT and DAY. Here is the code that made it work. Notice the pairing. Thank you all for the help. You sent my brain in a totally different direction but it was a good that you did. I hope someone else can use this and not have to spend a couple of days trouble-shooting it down. BTW, if anyone is brave they can try to chop the effect parameters down to just DAWN and DUSK. I got this working and a wise man once told me..... If it works, don't fix it. :D :D Again, thanks to all...Al

Share this post


Link to post
Share on other sites
Guest sapper42

glad it worked out, ill take note of the grouping myself as ive a lot of lighting to place on objects and itll be a labour intensive task :0)love the lightbeam FX, is it a flat beam or cone shaped ?rgds Jeff

Share this post


Link to post
Share on other sites
Guest FR153

This one is flat Jeff, haven't figured out all the nice little things to make it conical, yet. It does use two different textures and looks pretty cool at night. I do scenery for our VA and maybe I can get back and play with this one some more, down the road. Thanks again,Al

Share this post


Link to post
Share on other sites
Guest Regg001

Very simple to solve ... MS is placing the texture in the middle of the object you're drawing... SO design a texture that will duplicate itself top to bottom .See sample below .

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...