Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ThePat02
Copy link
Owner

@ThePat02 ThePat02 commented Dec 5, 2023

Added a new CUSTOM_SCRIPT tween value type to the Tween Leaf. It allows you to create a custom script (that is saved inside your scene) to have non-hardcoded tween values.

Template for the custom script

# Custom Tween Value
static func get_tween_value(_actor: Node, _blackboard: Blackboard) -> Variant:
	# Compute your custom logic here
	return 0

This template should automatically appear when creating a new empty script resource.

@ThePat02 ThePat02 linked an issue Dec 5, 2023 that may be closed by this pull request
@ThePat02 ThePat02 added the enhancement New feature or request label Dec 5, 2023
@ThePat02
Copy link
Owner Author

ThePat02 commented Dec 7, 2023

@SirPigeonz If you have any free time check this out. I am considering adding this to more nodes.

@SirPigeonz
Copy link
Contributor

SirPigeonz commented Dec 8, 2023

Oh, this I quite cool! :O I like it.
I wouldn't think about something like this myself!

We could do something similar like this for custom scriptable guards in FSM Transitions!
Where you want to use it additionally?

I tested it and seems to work fine! Although, my testing was fast, I don't have much time right now. That's also why I didn't make a new commit for my PR...

This also made me more cautious how I handle inner nodes and resources in my PR API I will revisit it!

@ThePat02
Copy link
Owner Author

ThePat02 commented Dec 8, 2023

We could do something similar like this for custom scriptable guards in FSM Transitions!
Where you want to use it additionally?

This system is pretty flexible, but afaik you can't edit internal scripts in an external IDE, so I would suggest using this for small scriptable stuff like conditions and values.

@ThePat02 ThePat02 merged commit 3500681 into main Dec 9, 2023
@ThePat02 ThePat02 deleted the feat-tween-custom-script branch December 9, 2023 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tween node - add option to use value from blackboard

3 participants