Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - themill

#1
Very nice! Thanks a lot for the quick reply!
#2
Hi! I apologize in advance if another thread addresses this issue. I was unable to find one, and don't have all day! ;) I am curious about using variables within dialogue messages. Specifically, I want to know whether a variable I set can influence what shows up in a given message, and how I would go about implementing this.

For example:
Say I set a variable to a random number between 1 and 2. If the variable sets to 1, a character's name becomes Bob. If it sets to 2, his name becomes Fred.

What I would want, then, is for the character to say either, "Hi, my name is Bob.," or "Hi, my name is Fred."

Now, I realize that I could create these as two seperate messages and use the value of the variable as a condition for one or the other to appear. However, if I end up using a larger range than two or three names, this becomes extremely cumbersome.

What I want to know is whether I can set up a script within a single message that changes a single word in that message depending upon what the variable is set to.

For clarity, another example would be setting a random number between 1-100, and having a character say, "My lucky number is ___," without having to create 100 seperate messages which operate conditionally depending upon the value of the variable. You see what I'm getting at?

I am not very proficient at scripting, and have been trying to figure this out for a couple of days, so any help would be greatly apprectiated!
SMF spam blocked by CleanTalk