ANNOUNCEMENT: Show your interest in a RPGAIO Live Stream Q & A Event! Click Here!

Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Awesome "Choose Next" Switch/Case nodes
#1
I have created a set of multi-path nodes that work sort of like a Switch/Case statement
The nodes are called 'Choose Next By Value'

I created 4 variations that handle from 2 to 5 different Case values.
The nodes take an Integer input and then follow a next node path depending on the comparison with Case values.

Here is an example of an NPC dialog that makes random statements by using a Choose Next By Value 3 Case node which allows 3 Case values and an Else (so 4 output paths) - this example is also using my Add Random Integer node 
   

Without these new Random and Choose nodes you would have to chain several Random true/false nodes together to get the same results.


Important: You need to change the file extensions to ".cs" (I had to upload them with the extension ".txt" because ".cs" files are not accepted)

Caution
Backup your GameData just in case something goes wrong and corrupts your configuration. 
If something does go wrong, delete the new node files from your project and restore your GameData backup.

How To Install
You can install these nodes by placing the class files in your project.
In my case I created a new folder called 'Custom' in this location: Assets/RPGAIO/Scripts/RPGMaker/Nodes/Custom
You can put them somewhere else if you like ... but I didn't test it.

*Don't forget to change the extension*


Attached Files
.txt   Choose2Int.txt (Size: 2.71 KB / Downloads: 14)
.txt   Choose3Int.txt (Size: 2.71 KB / Downloads: 6)
.txt   Choose4Int.txt (Size: 2.71 KB / Downloads: 4)
.txt   Choose5Int.txt (Size: 2.71 KB / Downloads: 6)
Reply
#2
thank you for this useful node.
Reply
#3
(10-16-2018, 09:36 AM)maniak Wrote: I have created a set of multi-path nodes that work sort of like a Switch/Case statement
The nodes are called 'Choose Next By Value'

I created 4 variations that handle from 2 to 5 different Case values.
The nodes take an Integer input and then follow a next node path depending on the comparison with Case values.

Here is an example of an NPC dialog that makes random statements by using a Choose Next By Value 3 Case node which allows 3 Case values and an Else (so 4 output paths) - this example is also using my Add Random Integer node 


Without these new Random and Choose nodes you would have to chain several Random true/false nodes together to get the same results.


Important: You need to change the file extensions to ".cs" (I had to upload them with the extension ".txt" because ".cs" files are not accepted)

Caution
Backup your GameData just in case something goes wrong and corrupts your configuration. 
If something does go wrong, delete the new node files from your project and restore your GameData backup.

How To Install
You can install these nodes by placing the class files in your project.
In my case I created a new folder called 'Custom' in this location: Assets/RPGAIO/Scripts/RPGMaker/Nodes/Custom
You can put them somewhere else if you like ... but I didn't test it.

*Don't forget to change the extension*

I also say thank you Smile
Reply
#4
Oh, this is a HUGE time saver. thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)