Playmaker Forum

PlayMaker News => General Discussion => Topic started by: mrminico on January 06, 2023, 06:22:10 AM

Title: Playmaker Grenade Detonate Action made by ChatGPT
Post 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.
Title: Re: Playmaker Grenade Detonate Action made by ChatGPT
Post by: djaydino on January 06, 2023, 10:52:26 AM
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 :) )
Title: Re: Playmaker Grenade Detonate Action made by ChatGPT
Post by: mrminico on January 12, 2023, 01:18:59 AM
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 :)
 
Title: Re: Playmaker Grenade Detonate Action made by ChatGPT
Post by: djaydino on January 12, 2023, 11:26:04 AM
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
Title: Re: Playmaker Grenade Detonate Action made by ChatGPT
Post by: Broken Stylus on April 02, 2023, 11:48:12 AM
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.
Title: Re: Playmaker Grenade Detonate Action made by ChatGPT
Post by: relaxmix on July 02, 2023, 11:41:41 PM
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.
Title: Re: Playmaker Grenade Detonate Action made by ChatGPT
Post by: sherylsimmons on July 07, 2023, 02:48:20 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.
I also used chatgpt to solve my problem but it didn't really work, so I never used it again.
Title: Re: Playmaker Grenade Detonate Action made by ChatGPT
Post by: wetcircuit on July 07, 2023, 11:46:12 PM
Never got working code.  ::)