-
Notifications
You must be signed in to change notification settings - Fork 1
Add new EMAddPointsUnit and EMResetPointsUnit units #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Awesome PR and brilliant description. ❤️ I'm still not 100% convinced that the pulse logic should sit in UVS. Can you point me to the implementation you did where it sits at the score reel component? I'd like to understand the messiness you've mentioned and weight it against the additional complexity this brings to the author. |
Thank you. Couldn't have figured this all out with @Scottacus64. I feel that the As for the proof of concept you mentioned, it is at: freezy/VisualPinball.Engine@6db0559 and f580566 I wasn't sure how to get the ClearDisplay state updates back to scripting. So I used EventHandlers. Since the Unit's FWIW, the score reels work fine as they are (minus the sometimes out of sync issue we need to look at). These new nodes are just to help provide the illusion of EM authenticity. |
Great write up! A score of 100 would not go through the score motor but would be a direct actuation of the 100 reel coil by the 100 point coil via some playfield switch. A score of 500 would go through the score motor though. The EM Add Points "started" and "stopped" are great additions because these can be used by authors to block other scoring while the score motor is running. How are we going to handle scores other than a multiple of five? These are usually x,x,x,pause,pause but can be x,pause,x,pause,x as well (at least according to one of my sources). In the EM Reset Points node we need to add a pause between the first five and second five pulses since the score motor has six positions. Also the node would need to know to exit if all scores are at zero after the first five pulses. Lastly this is modeled after a Gottlieb/early Bally score motor. Some later Bally and William score motors used more than six positions to a single run but for our purposes this would add a lot of unnecessary complexity since all of them use five consecutive pulses to score a multiple of five times a given score and from what I've seen, cluster the scoring of 2x and 3x in the cluster of five. |
Okay, we should fix
We should try to get this built in as well. We can discuss via Discord.
I will go through and double check the timing.
Currently the unit handles that. If the output point value is greater than 0 at the end of the 6 pulses, it will perform another 6 pulses.
We could always add another input to the node that is the count of positions, instead of hardcoding 6 into the units. |
An alternative would be to have "EM add points" just be something like "EM Score Motor" and only use it when the score motor is invoked. We could use the native player score increase to handle single point values and if needed add an "If" blocker node should scoring need to be blocked by the score motor running. |
Closing this PR for now as we should not being doing mech logic in Visual Scripting. |
Even though closed, I did take one more stab at getting this closer to the above comments. Please re-review the initial comment. (Edit: Had to reopen/close for latest commits to show) |
Removed switch lamp updates since that was merged in #6 |
Closing this PR again as it is now superseded by #8 |
This PR adds two new units
EMAddPointsUnit
andEMResetPointsUnit
that was designed with the assistance of @Scottacus64.EMAddPointsUnit
This unit accepts Point Value, Positions, Duration (in ms), and Block Points values.
Point Value is used to calculate the amount of points to add for each pulse of the unit.
Examples:
Score 50 points while the score motor is not running:
Score 50 points while the score motor is running:
Score 100 points while the score motor is not running:
Score 100 points while the score motor is running and Block Points disabled:
Score 100 points while the score motor is running and Block Points enabled:
The Duration and Positions are used to calculate delays.
The examples were based on a Gottlieb score motor with 6 positions.
EMResetPointsUnit
This unit accepts Point Value, Positions, and Duration (in ms) values. It can be used to simulate the values of a resetting score reel.
Point Value is used as a starting point. For each pulse, all digits are incremented until they reach 0.
Example:
Score reel shows 2041 points:
This example is based on a Gottlieb score motor with 6 positions.