Playmaker Forum
PlayMaker News => General Discussion => Topic started by: mrminico on January 06, 2023, 06:22:10 AM
-
For those interested in another solution, when it comes to dead ends and custom actions, I find this approach interesting.
I saw ChatGPT could generate regular scripts and thought... Maybe I should try to see if it could generate PM actions too.
To my surprise, it worked, although this isn't foolproof. I had to look at other playmaker scripts, modify a small amount of code like the namespace and remove/replace other things and it worked!
I'm attaching the action here incase anyone wants to check out what the bot did.
-
Hi.
ChatGPT works partly, but for example in your action there is no void Reset()
which is still ok, but there is also no Finish();
So the action will never finish
Also its probably better for performance to use a ComponentAction<Rigidbody>
instead of a FsmStateAction
Try comparing to some existing actions. (search for some rigidbody actions :) )
-
Hi.
ChatGPT works partly, but for example in your action there is no void Reset()
which is still ok, but there is also no Finish();
So the action will never finish
Also its probably better for performance to use a ComponentAction<Rigidbody>
instead of a FsmStateAction
Try comparing to some existing actions. (search for some rigidbody actions :) )
Hi Djaydino thanks for the feedback! I did mention it wasn't foolproof so I'm not surprised its missing some essential code such as void Reset or Finish();
Either way, it was a fun tool to mess around with I'm not really looking to integrate this in any of my workflows since I'd rather make a "grenade detonate" myself with all the current actions already available :)
Just thought it would be a useful resource for some people here :)
-
Hi.
Well you could also try to create a custom action by looking to the combined actions you used :)
it a good practice to look into as you will slowly start to learn some basic C#
Which will make the usage of playmaker even more powerful (ability to create your own custom actions) :D
I actually learned C# thanks to playmaker
-
I wonder if it could handle delegates and callbacks. Besides, it builds on the basis of C#, but Unity uses a slightly altered version of it, and Playmaker's scripts for actions also use even more different uses, which I doubt ChatGPT devs have included into their algorithms.
-
I wonder if it could handle delegates and callbacks. Besides, it builds on the basis of C#, but Unity uses a slightly altered version of it, and Playmaker's scripts for actions also use even more different uses, which I doubt ChatGPT devs have included into their algorithms.
This is really probable.
-
For those interested in another solution, when it comes to dead ends and custom actions, I find this approach interesting.
I saw ChatGPT could generate regular scripts and thought... Maybe I should try to see if it could generate PM actions too.
To my surprise, it worked, although this isn't foolproof. I had to look at other playmaker scripts, modify a small amount of code like the namespace and remove/replace other things and it worked!
I'm attaching the action here incase anyone wants to check out what the bot did.
I also used chatgpt to solve my problem but it didn't really work, so I never used it again.
-
Never got working code. ::)