- This topic has 12 replies, 4 voices, and was last updated 4 years, 8 months ago by Tom.
-
AuthorPosts
-
October 7, 2019 at 9:21 pm #147313
Need some general scripting help. How would I script the following scenarios.
(1) If L65a (light) state is on, then primitive029 (bumper ring) has image ” xxxxx ON” and primitive 030 (bumper cap) has image “xxx ON”and when off image “xxxxOFF”.
(2) If L31 (light) state is on, then Flasher26 (flasher) is on .
(3) If Flasher17 (flasher) is on and Flasher 18 is off, then primitive X “image xxxx”, If Flasher 17 is off and Flasher 18 is on, then Primitive X “image”, if flasher 17 is on and flasher 18 is on, then Primitive X “image”
Thanks!!!
You need to login in order to like this post: click here
October 7, 2019 at 10:14 pm #147319If bumperlight1.state=1 and GI_1.state=1 then bumperL_prim.image=”cap1ON”
– the general form.
You need to login in order to like this post: click here
October 7, 2019 at 10:28 pm #147321If L49a.state=1 then Primitive024.image=”bumpercap1ON”
If L49a.state=0 then Primitive024.image=”bumpercap1OFF”Is this right? I was only going to use two images, so does GI need to be in there. Does it have to be in a sub?
You need to login in order to like this post: click here
October 7, 2019 at 10:59 pm #147326I have comparable examples in Goin’ Nuts, Black Knight… They aren’t in front of me but you should be able to find how they work in the script pretty easily.
You need to login in order to like this post: click here
October 7, 2019 at 11:02 pm #147329@Bord, I was looking at your Centaur and that was more complex than I care to make it!!!or comprehend
You need to login in order to like this post: click here
October 7, 2019 at 11:04 pm #147331No. GI doesn’t need to be there if you don’t have a GI to manipulate. Sub needed ? Depends. Maybe just put it inside a fast timer like the flippers ?
Pseudo-code follows ( which is very UNUSEFUL for flippers I should add )
sub flip_timer()
if bumperlight.state = 1
then
prim1.image=”oh crap”
prim2.image=”more crap”
end if
end sub
I highly recommend that you download the script repo : https://github.com/sverrewl/vpxtable_scripts
Then extract all those scripts to a folder somewhere and use a tool like https://www.nirsoft.net/utils/search_my_files.html to find what you’re looking for inside many hundred of thousand of code lines. Should be plentiful of good examples and that tool works partly like a unix grep. Of course, you kind of need to know what your looking for, but, still.
You need to login in order to like this post: click here
October 7, 2019 at 11:11 pm #147334I don’t have that downloaded but I do reference that site, thanks for that.
I was going to ask if I needed a timer to get it to work? Cause it aint workin.lol
You need to login in order to like this post: click here
October 7, 2019 at 11:24 pm #147337I copied the flipper timer and made a light timer because I didn’t want to interfere with anything already happening??? does this look ok, sill not working
‘**********************************************
‘Special Light States
‘**********************************************Sub LightTimer()
if L49a.State=1 then
bumperring1.image=”bumperring1GION”
bumpercap1.image=”bumpercap1ON”
end if
if L49a.State=0 then
bumperring1.image=”bumperring1GIOFF”
bumpercap1.image=”bumpercap1OFF”
end if
if L65a.State=1 then
bumperring2.image=”bumperring1GION”
bumpercap2.image=”bumpercap1ON”
end if
if L65a.State=0 then
bumperring2.image=”bumperring1GIOFF”
bumpercap2.image=”bumpercap1OFF”
end if
if L81a.State=1 then
bumperring3.image=”bumperring1GION”
bumpercap3.image=”bumpercap1ON”
end if
if L81a.State=0 then
bumperring3.image=”bumperring1GIOFF”
bumpercap3.image=”bumpercap1OFF”
end if
End SubYou need to login in order to like this post: click here
October 7, 2019 at 11:43 pm #147343If things ain’t working – put some debug.print here and there to figure out what is going on. Might it be that something isn’t set to visible maybe ? .visible and .state both need to have non-zero values. Depends on object if I remember correctly. Flasher vs Light. You have to look at the command ref.
Not the best code I’ve seen, but not directly wrong either. Just more processing than needed. This is a one or the other code – so why not use
if xxx then
….
else
…
end if
You need to login in order to like this post: click here
October 8, 2019 at 12:18 am #147348I have no clue what the hell I am doing….. I just spent the last hour trying to get the light to just shine through the cap instead of swapping images. Cant even get that to work… think its bed time for tonight!
You need to login in order to like this post: click here
October 8, 2019 at 3:35 am #147354your code might be working
but you could have the primitives set to “Static Rendering” or using a material that keeps the Lights from shining through the primitive or preventing image swapping
based on those numbers I can tell this is for Party Animal
is their a reason why you are not mapping this so that they are controlled by the rom and not the (rom controlled) light
all that code can be done in 2 lines per bumper followed by 2 NfadeL lines IF you want the light objects under the bumper caps
with Jps lights
NFadeObjm 49, bumperring1, “bumperring1GION”, “bumperring1GIOFF”
NFadeObjm 49, bumpercap1, “bumpercap1ON”, “bumpercap1OFF”
NFadeObjm 65, bumperring2, “bumperring1GION”, “bumperring1GIOFF”
NFadeObjm 65, bumpercap2, “bumpercap1ON”, “bumpercap1OFF”
NFadeObjm 81, bumperring3, “bumperring1GION”, “bumperring1GIOFF”
NFadeObjm 81, bumpercap3, “bumpercap1ON”, “bumpercap1OFF”
again make sure that “Static Rendering” is not set on the primitives.
( 2)
NfadeLm 31, L31
Flash 31, Flasher26
and if you remove static rendering from the primitives and set the depth bias to 200 the bumper lights look pretty good
see a table you like help me find the resources so that I can finish it
https://www.dropbox.com/sh/7qtake9whi5ium2/AAB4K4W78oMVlqSxTzKtGHTHa?dl=0see a table you like help me find the resources so that I can finish it
https://www.dropbox.com/sh/7qtake9whi5ium2/AAB4K4W78oMVlqSxTzKtGHTHa?dl=0You need to login in order to like this post: click here
1 user thanked author for this post.
October 8, 2019 at 6:43 am #147381For the last couple days I have been struggling to understand why the light wouldn’t light up the bumpers…. thanks
You need to login in order to like this post: click here
October 8, 2019 at 9:08 pm #147479figured out
You need to login in order to like this post: click here
-
AuthorPosts
Forums are currently locked.