Jump to content

Recommended Posts

Hey guys, I'm sure this is a simple answer and I'm just overlooking something. I have a custom action that fires on prefabs with a custom component...works just fine when I have my item equipped and click on the object in question...but it will not work with the space bar. If I space bar near like some grass, that has both pickable and my fingerable component, it just picks the grass. How can I make spacebar prioritize my action? 

 

 

Hey guys, I'm sure this is a simple answer and I'm just overlooking something. I have a custom action that fires on prefabs with a custom component...works just fine when I have my item equipped and click on the object in question...but it will not work with the space bar. If I space bar near like some grass, that has both pickable and my fingerable component, it just picks the grass. How can I make spacebar prioritize my action? 

 

Hm, this is probably a pretty shoddy solution, but maybe you could have your action fire 1 tick after you press the spacebar, overriding whatever action came before it.

 

like:

inst:DoTaskInTime(0, function() --making it 0 will cause it to run on the next tick   --do the thingend)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...