PDA

View Full Version : Basic Scripting Question



cakewitharse
11-30-2004, 12:40 PM
Quick question about basic scripting...

If I'm attempting to have a script match what variables I put in, in the syntax... how do I do so? For example, if I have a script called .smile, but I had two variables (manner & target), how do I match the script to my variables?

I don't feel like I can explain myself well, since I have to experience scripting, yet; so, I'll show you what I mean.

.smile corner Pubert
Would result in inputting "smile towards Pubert, lifting only the corner of his mouth." into the game.

.smile fluster Beaumont
Would result in inputting "smile at Beaumont, clearly flustered by their comment." into the game.

Etc, etc. I know very little, and I've begun working on it, but can't seem to get very far. I'm matching up the %1 and %2, and I've started setting a few Goto's... but I'd greatly appreciate a bit of knowledge, if somebody cares to share.

I'm obviously a :noob:

Trinitis
11-30-2004, 12:47 PM
Hrm..I'm not exactly sure what your asking for..

Are you wanting the script to match off people to smile differently for different people?

Or are you wanting to tell it how to smile, and who to smile at?


If its the later, thats fairly easy, the script would look something like this.


smile.cmd

put smile %1 %2
exit



%1 is the first thing that comes after the script name, %2 is the second, and so on.

cakewitharse
11-30-2004, 12:51 PM
Sort've like the latter of the two, only I want to have predetermined smile actions in the script, so if I do put smile %1 %2, it won't say You smile corner Pubert... instead, it'll match with the flag "corner" and send the "smile towards Pubert, lifting only the corner of his mouth" to the game.

Did I make anymore sense, there?

Latrinsorm
11-30-2004, 01:13 PM
Yes.

goto %1

corner:
put smile towards %2, lifting only the corner of his mouth.
exit

giggly:
put smile at %2, a giggle slipping through his teeth.
exit

etc. Just don't forget your labels. :)

cakewitharse
11-30-2004, 01:15 PM
I love you.:thumbsup: