The Workshop’s features have been improved greatly since originally posting this thread.
Thank you to the community for your responses. And thank you to the Developers for adding features that permits us to do so much more on the workshop now than when this thread was originally posted.
Original Post
I’m trying to apply sideways thrusters to her mech - as well as other workshop ideas - but I can’t seem to find a reliable way to determine if she is in mech or not.
All of the previous threads I’ve seen posted on the subject are either health or height scripts - which I can’t seem to get to work right. Has someone found a reliable way to get the D.Va Mech to be detected and connected to a variable so that I could apply an ability to her while in mech - but not while out of mech?
[Edit - I actually like how the thrusters feel when out of mech. I might keep it as is. But if anyone does know how to check for this variable for “in or out of mech” - I would greatly appreciate it for some of the other ideas that I have in mind.]
I don’t think this exists. Health is your best bet, but try to give flexibility because armor from brig counts as max hp I believe.
You could track what happens to dva. If she spawns (is alive == true) she is in mech. If she is in mech and her health goes to 0 she is out of mech. If she is out of mech and uses ultimate ability she is in mech again.
The only edge case is when she gets resurrected, as she gets resurrected as baby dva. To fix this you could force the dva to press ultimate when “is alive == true”.
That gets very complicated with how her ult works. But I think it could be done.
Ah yes, I forgot to add: When she is in mech and uses ult she gets out of mech.
I would just go with if Max Health >300 (To account for occasional shield/armor)
I found a way to make it work with Heights. I’m not sure why I couldn’t get heights to work before now that I have them working.
WORKSHOP CODE :: RTXYD - Booster rework with Mech damage rework ; codes aren’t really well labeled, but the code is there if you want an example of how it works. [see my other thread on D.Va Rework for a better version of the code]
Recorded her pilot variable height as being between 1.40 and 1.31 when standing in place 1.32 being her normal. Then her mech height being between 1.51 and 1.8 So I just made a variable rule that if height is greater than 1.41 = Mech ; If below 1.40 & less = Pilot
I tried doing something about “is using ultimate” but decided it was better just to go with “is button pressed” and conditions based on that variable heights. In the provided example she has 200 HP when a pilot and 500 HP when a Mech (also a 1.5x crit modifier when in mech, rathern than the standard 2x) ; but the mode is only designed to be played with a Single D.Va.
There’s a little glitchiness where the system will recognize a lower height setting if you boost into an object, but it resets the max health to normal after a slight hiccup without affecting current health/damage.
Am I wrong to say that the Max Health code doesn’t work for me?
Player based value syntax.
Every time I’ve done anything with Max Health numbers it refers to Max Health as a percentage of Max Health from normal. So if you’re saying Max Health is >500 ; isn’t that akin to telling the code that your Health is 3k total? Because that’s how the workshop seems to read it.
“Health => X” seems more appropriate than “Max Health” (I’m not really touching OW today, so I can’t test to verify)
But I digress.
I appreciate all the input guys.
2 Likes
When setting a players max health, you set it as a percentage. But when calling for the players max health value in the conditions, it’s as the number you see on your HUD 
1 Like
compare (is in alternate form(event player)==true for baby dva and false for meka dva
Wich works now but was not possible a year ago.
Weapon(event player)==1 should also work
Maybe I should edit the original post to say the question has been resolved
XD
No joke though, the Workshop features are so greatly improved in their current state vs how they were when I made this topic.
2 Likes