I am new to this comunity and I am seeking advise on how to improve my current script. Below is the code:
if (condition1 == true) string stringname = "dog";
if (condition2 == true) string stringname1 = "cat";
if (condition3 == true) string stringname2 = "mouse";
if (condition4 == true) string stringname3 = "crab";
Format.String("Animal Type: {0}, {1}, {2}, {3}", stringname, stringname1, stringname2, stringname3); // print to output
Specifically what I would like is to be able to display the result in the output window in the following way:
example 1: assuming condition 1 and 3 are true and 2 and 4 are false: "Animal Type: dog, mouse" Whilst with my current script I would get: "Animal Type: dog,, mouse,"
example 2: assuming condition 2 and 3 are true: "Animal Type: cat, mouse" Whilst with my current script I would get: "Animal Type: ,cat, mouse,"