Jump to content
jonnyetiz

Multiple Choice variable?

Recommended Posts

Hello. I'm working on a small script and I need to figure out the following:

 

If I wanted to do a variable that works LIKE a Boolean, however instead of being true/false it can be one ofthings that are defined somewhere.

For example, let's say a, b, c, and d are what I want to "replace" for the true/false. I guess it would be like a "multiple choice" where it can be a, b, c, OR, d, where the 4 or more of them are defined somewhere before.

 

I would need to be able to

player setVariable ["SomeVariableName",a];

where a can be replaced with b, c, or d.

 

Is there any way, or what's the closest way to do something like this?

 

All help greatly appreciated.

Share this post


Link to post
Share on other sites

Post in the right section,

Change your title for something more explicit. You are on a forum supposed to help some other people, searching for consistent topics.

Be clearer. Your question has no sense. Just say what you intend to do, not working around some supposed variable behaviors.

Share this post


Link to post
Share on other sites
15 hours ago, pierremgi said:

Post in the right section,

Change your title for something more explicit. You are on a forum supposed to help some other people, searching for consistent topics.

Be clearer. Your question has no sense. Just say what you intend to do, not working around some supposed variable behaviors.

I fixed it but it's as clear as I can make it

Share this post


Link to post
Share on other sites

Usually people say what they intend to cook, so somebody can help with the recipe. Here you want to replace mushrooms for potatoes, but nobody catches the meal.

Share this post


Link to post
Share on other sites
1 hour ago, pierremgi said:

Usually people say what they intend to cook, so somebody can help with the recipe. Here you want to replace mushrooms for potatoes, but nobody catches the meal.

Never mind, I've figured it out. I overlooked something.

Share this post


Link to post
Share on other sites
3 hours ago, pierremgi said:

Up to you for making this topic useful...

You worked hard there, with little progress, Pierre!
I read his signature. The first line is a preemptive apology for posting in the wrong forum, the second is an advert for a life server. Valuable community member right there.

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×