Page 1 of 1

Wiper question

Unread postPosted: Sat Jun 18, 2016 7:04 am
by eyein12
Im trying to add new wiper pairs and animations. I have all of the small stuff done but I cant figure out the scripting part. I read the devdocs and see that there are two control values that might be useful:

GetWiperValue and SetWiperValue ( do these control the wiper pairs and subsequently allow the rain to be wiped away?)

Im familiar with basic scripting at least able to set up controls and simple calls. But I cant seem to link my new wipers to their respective wiper pairs so that they can swipe away rain on the windows like the global controller "wipers" does.

I set up my script like this

Code: Select all
if Call("*:GetControlValue", "FrontCenterWipers", 0) == 0 then

Call( "*:SetWiperValue", "Wipers_Center", a, 0)


elseif Call("*:GetControlValue", "FrontCenterWipers", 0) == 1 then

Call( "*:SetWiperValue", "Wipers_Center", a, 1)

end

in the oncontrolvalue section of my .lua but doesnt work.

Any help would be appreciated

Ian

Re: Wiper question

Unread postPosted: Sat Jun 18, 2016 7:13 am
by bnsfsubdivision
You basically don't need any scripting to make the wiper pairs work. Once you have the animation done and exported, you need to reference it in your engine.bin file. I would suggest reading through PapaXpress' tutorial (originally written by Jerry C.) as it pretty much explains all the required steps to make the wiper animations work. http://thegradecrossing.blogspot.de/201 ... ation.html

Re: Wiper question

Unread postPosted: Sat Jun 18, 2016 10:53 am
by eyein12
It is easy to reference the wiper animation for the default control "wipers" something which I have done since the beginning. However It will not work for added wiper controls for example: I want to take separate wipers and have them wipe individually. You therefore need individual maps, animations, and controls which I have and separate wiper pair references which I have. However the game needs a script to put it all together for some reason( I have already tried a separate wiper control using the method you described but does not work). the default "wipers" works fine if thats used and referred to. needs a script once again.

Ian

Re: Wiper question

Unread postPosted: Sat Jun 18, 2016 1:40 pm
by eyein12
bnsfsubdivision wrote:You basically don't need any scripting to make the wiper pairs work. Once you have the animation done and exported, you need to reference it in your engine.bin file. I would suggest reading through PapaXpress' tutorial (originally written by Jerry C.) as it pretty much explains all the required steps to make the wiper animations work. http://thegradecrossing.blogspot.de/201 ... ation.html


I replied to your PM.

Re: Wiper question

Unread postPosted: Sat Jun 18, 2016 9:47 pm
by PapaXpress
Wipers have been an all or nothing deal for me. I have tried to split them out and while I could call out the animations, they would not clear the windows. Think about how the window components in the GEO are not matched up to any designated side of the model, thus there is no way to say "only the conductor windows get cleared".

Re: Wiper question

Unread postPosted: Mon Jun 20, 2016 6:29 am
by eyein12
PapaXpress wrote:Wipers have been an all or nothing deal for me. I have tried to split them out and while I could call out the animations, they would not clear the windows. Think about how the window components in the GEO are not matched up to any designated side of the model, thus there is no way to say "only the conductor windows get cleared".


you can clear only the conductors window simply by changing the 4th slot texture wipe pattern to only be on that window location. the rub is it has to be using the "wipers" control. A script comes in to play to makethe others do the same. its very possible and already has been done. We are currently figuring out the script for this. but if you add more wiper pairs and reference the exterior animations you just need to tell the game that its time to use "these controls" versus "wipers"


Ian