Skip to content
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

hookupVariables cannot be used in VMs #1841

Open
DrprofLuigi opened this issue Aug 25, 2024 · 2 comments
Open

hookupVariables cannot be used in VMs #1841

DrprofLuigi opened this issue Aug 25, 2024 · 2 comments
Labels
bug Code broke, fix yes?

Comments

@DrprofLuigi
Copy link
Contributor

On trailers, hookupVariables cannot be used in VMs.

For example I have a basic VM thatapplies the p_brake lever when either t_brake or !connection_1_1_connected is 1.

		{
			"variable": "p_brake",
			"animations": [
				{
					"animationType": "translation",
					"variable": "t_brake",
					"axis": [0, 0, 1]
				},
				{
					"animationType": "translation",
					"variable": "!connection_1_1_connected",
					"axis": [0, 1, 0]
				}
			],
			"minValue": 0,
			"maxValue": 1
		}

But because t_brake is pulled from the towing truck via hookupVariables, it does not effect this VM.

This also applies to subParts. If a subPart references the brake in animations, lightObjects, etc. it works fine. However when that subpart tries to use brake in a VM, it doesn't work.

For UNU specifically, this also prevents animated suspension from being able to activate.

@DrprofLuigi
Copy link
Contributor Author

This may actually be due to VMs not working on trailers period.

I have two gauges on my tank trailers. One simply references a part variable, and the other does math with VMs. The latter does not work when the trailer is attached to a vehicle, but it does when it is not connected.

@DonBruce64
Copy link
Owner

Also needs CVs done like the other bug. Not touching variables till that beta is tested.

@DonBruce64 DonBruce64 added bug Code broke, fix yes? needscvs labels Aug 30, 2024
@DonBruce64 DonBruce64 added invalid ERROR 404: issue not found! and removed invalid ERROR 404: issue not found! needscvs labels Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Code broke, fix yes?
Projects
None yet
Development

No branches or pull requests

2 participants