Wonderful idea ! Changing size and location of Toy Shadow definitely can be done.
I will show you how...
Francisco, you should learn how to use the "miniplayfield" feature of BAM. It was designed for grabbing a small playfield and scaling it and moving it onto the table.
But you can grab anything or group of things on and off the table .
In this case you grab the shadow toy inside a miniplayfield box and attach it to the tracked ball.
Because it is now a "miniplayfield" , you can use the miniplayfield code to change its size and location in the code...
Addendum: I just updated the above link If you press "B" on keyboard it should change shadow size I used this code:
Code:
Dim ShadSize ' The User Has Pressed A Key on the Keyboard.. ' Sub FuturePinball_KeyPressed(ByVal KeyCode) 'AddDebugText "KeyCode = " & KeyCode 'AddDebugText "Titled = " & fpTilted ' ' Process any keys which are valid at all times ' If keycode = 48 then ShadSize = ShadSize + 1 If ShadSize = 7 then ShadSize = 1 If ShadSize = 1 then miniplayfield_0.Scale = 0.3 If ShadSize = 2 then miniplayfield_0.Scale = 0.6 If ShadSize = 3 then miniplayfield_0.Scale = 1 If ShadSize = 4 then miniplayfield_0.Scale = 1.3 If ShadSize = 5 then miniplayfield_0.Scale = 1.6 If ShadSize = 6 then miniplayfield_0.Scale = 2 End if
Last edited by Gimli on Thu Mar 07, 2019 11:26 pm, edited 1 time in total.
francisco666
Post subject: Re: Bam Ball shadow
Posted: Thu Mar 07, 2019 10:49 pm
Joined: Mon Aug 15, 2011 10:02 am Posts: 1889 Location: Argentina
Thanks for looking it and the reply
O i see, correct me if I wrong, the toy must be inside the miniplayfield all the time, and now the miniplayfield going to follow the ball as be his shadow?
O i see, correct me if I wrong, the toy must be inside the miniplayfield all the time, and now the miniplayfield going to follow the ball as be his shadow?
Correct ! Pretty cool ! You can attach anything you want A shadow is very useful , great idea !
francisco666
Post subject: Re: Bam Ball shadow
Posted: Fri Mar 08, 2019 12:46 am
Joined: Mon Aug 15, 2011 10:02 am Posts: 1889 Location: Argentina
Mmm Im having some problems with this, the toy cant be found when when I use MiniPlayField_0.Position.,
Edit 1-2: for some reasom the toy is not visible if it is under the ball when using the miniplayfield or not Could it be the tga transparent?
Also why the miniplayfield are not traking the ball? Is moving but not allways under the ball
Mmm Im having some problems with this, the toy cant be found when when I use MiniPlayField_0.Position.,
Edit 1-2: for some reasom the toy is not visible if it is under the ball when using the miniplayfield or not Could it be the tga transparent?
I had the same problem. Try making a visible shadow toy
francisco666 wrote:
Also why the miniplayfield are not traking the ball? Is moving but not allways under the ball
Yes, I agree that the shadow isn't always under the ball, but that would be the case with a shadow based on light source... You can play around with the position of the shadow as shown in the video below. I used my cheatcode to change the scale of the shadow, but you can also adjust the scale on the fly from the BAM menu When happy , you need to press control C in upper half of Miniplayfield menu to create a new Dim Miniplayfield_0 and a new Set Miniplayfield_0
Joined: Mon Aug 15, 2011 10:02 am Posts: 1889 Location: Argentina
Whell after hours of try and error I foynd that the Center miniplayfield coordenates was the ones doing the mess.
I dont know how to calculate in a proper way, I just adjust it in q dev option untill I get the values ones, or so I think
The main thing of doing it with minipfs is to reduce the size of the shadow so when the ball are in ramps it drop a smaller shadow on playfield, I try with a fail of the 99.99% with a error of 0.01%. Shadow dont stay in playfield, I have foresee that in my mind, but couldnt script in a proper way and the shadows dont get smaller
For now I have a "momentary" roll back to square 1, use the old script and using the texture change so I change the shadowToy texture if its on the rail or on the ground
It is currently Sun Dec 08, 2019 5:11 am All times are UTC - 5 hours [ DST ]
Who is online
Users browsing this forum: No registered users and 3 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum