Author Topic: Clueless newb wants to get into Scripting  (Read 1178 times)

0 Members and 1 Guest are viewing this topic.

Offline Taehl

  • Camper
  • ***
  • Posts: 253
  • When a fool hears about Tao, he just laughs.
    • Pixel Perfect
Clueless newb wants to get into Scripting
« on: June 14, 2007, 07:06:53 am »
At this point, all I know is that Scripts are optional, are on a per-server basis, and allow changes to the game to be made.

What I would like to learn is:
* Does/can it affect singleplayer with bots?
* What are its limitations?
* Does using scripting have any adverse affects (assuming your script isn't bad)?
* Can you use more than one script at a time? How do you enable and disable scripts?
* Can anyone tell me, step by step,  how to make and use a most basic script?

Sorry if this has already been asked before, I looked around, but didn't see answers to those questions.
"The balance is perfect. The flow is perfect. The speed is perfect. This... Is the absolute best mod on the site."  - mxyzptlk
"THIS IS PROBABLY... scratch that ...this IS the best mod I have seen before. Dang man, nice job!"  - Dorkey Dear
"Whoa! This is the best mod ever!!!"  - imacheater2k7      "Looks like a beaut. On a rating, 6/5"  - Radical Terrorist
New and improved: LandWarrior 3.0

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: Clueless newb wants to get into Scripting
« Reply #1 on: June 14, 2007, 07:45:49 am »
Scripting is only in the standalone dedicated server; what you can do however is run the dedicated server locally and join with the client, so it has the same effect but you can use scripting.

It's limited to what scripts you can write using the language provided; as well as the limited things you can alter from within scripting. You can read the reference manual for information on if a specific action is possible, or you can ask here.

It's possible that scripting can cause occasional crashes, but this is getting better in recent versions of the dedicated server.

Yes, you can use more than once script at a time. However, you need to combine them together yourself, since there can only be one given hook at a time. Scripts are either all on, or all off; if you want to remove a specific script, you have to physically remove it.

Download a simple existing script from the script releases forum for an example of how to do something.
« Last Edit: June 14, 2007, 07:59:54 am by chrisgbk »

Offline mxyzptlk

  • Veteran
  • *****
  • Posts: 1493
  • The Panda Ninja
Re: Clueless newb wants to get into Scripting
« Reply #2 on: June 14, 2007, 07:52:06 am »
..

Interesting, but why do you keep misspelling use, sue?

"While preceding your entrance with a grenade is a good tactic in
Quake, it can lead to problems if attempted at work." -- C Hacking

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: Clueless newb wants to get into Scripting
« Reply #3 on: June 14, 2007, 07:59:09 am »
..

Interesting, but why do you keep misspelling use, sue?
Because my hands always get mixed up, but I usually catch it. Also why I spell the as teh constantly.
« Last Edit: June 14, 2007, 08:03:18 am by chrisgbk »

Offline Taehl

  • Camper
  • ***
  • Posts: 253
  • When a fool hears about Tao, he just laughs.
    • Pixel Perfect
Re: Clueless newb wants to get into Scripting
« Reply #4 on: June 14, 2007, 09:05:51 am »
Okay, say I want to use "Death Information". What do I do with that code? Do I save it to a file or something?

Heh, and I'm a pretty bad offender of 'teh', too.
"The balance is perfect. The flow is perfect. The speed is perfect. This... Is the absolute best mod on the site."  - mxyzptlk
"THIS IS PROBABLY... scratch that ...this IS the best mod I have seen before. Dang man, nice job!"  - Dorkey Dear
"Whoa! This is the best mod ever!!!"  - imacheater2k7      "Looks like a beaut. On a rating, 6/5"  - Radical Terrorist
New and improved: LandWarrior 3.0

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: Clueless newb wants to get into Scripting
« Reply #5 on: June 14, 2007, 10:00:06 am »
I'd recommend using the script combiner for your first time; http://scriptcombiner.awardspace.com/

Also, most people tend to use the recommended all scripts combined in a single file mentaility, which is what I will base this on.

Since you don't have any existing scripts, check "Use template" on the left side, and paste the script in the right, then press the button to combine them, and save the output to one file in the scripts directory of the dedicated server as filename of your choice. Then modify Includes.txt to contain only the new file.