So I’d like this to set the x scale of the node to .5 for .3 seconds, before returning to the original value. Is there an alternate way I can write this? Thanks.
The reason why it is not working is that you are not passing in an actual node property.
You are just passing in the integer x value of the scale.
You are going to have to change the function to accept the node and gain access to its scale property.
Thanks for your response! I’m looking for a way to make it as reusable as possible for more than just the scale property, so I tried passing in the property to be changed as a string, and this worked for me:
func setTemp(myNode,propString,tempVal,time):
var origVal = myNode.get(propString)
myNode.set(propString,tempVal)
await get_tree().create_timer(time).timeout
myNode.set(propString,origVal)