Jump to content

Detection event for Wheel broken?


Recommended Posts

Is there a GameEvent or function that fires when a wheel breaks?
Specifically - when the wheelDamage.isDamaged value get set to true.

I was hoping to get something to fire when this happens rather then constantly testing the value in a FixedUpdate piece of code.

I've tried the GameEvent.onPartFailure(runthis)  but that doesn't seem to fire for wheel breakages.

Edited by cyberKerb
Link to comment
Share on other sites

12 minutes ago, sarbian said:

Check when onWheelRepaired is fired, who knows...

Thanks Sarbian - I checked that as well just now.

Unfortunately it only fires on the EVA repair event. Propably fired under the event wheelDamage.EventRepairExternal()

I've scoured the API for while this afternoon and I think my only option is a FixedUpdate check like the below.

public Boolean firedalready = false;

private void FixedUpdate()
{
	if (this.wheelDamage.isDamaged && !this.firedalready) 
	{
		this.firedalready = true
		runMyRoutine()
	}
}

 

Link to comment
Share on other sites

  • 1 month later...
On 6/1/2018 at 2:31 AM, wile1411 said:

Thanks Sarbian - I checked that as well just now.

Unfortunately it only fires on the EVA repair event. Propably fired under the event wheelDamage.EventRepairExternal()

I've scoured the API for while this afternoon and I think my only option is a FixedUpdate check like the below.


public Boolean firedalready = false;

private void FixedUpdate()
{
	if (this.wheelDamage.isDamaged && !this.firedalready) 
	{
		this.firedalready = true
		runMyRoutine()
	}
}

 

That is about the only option you have.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...