step by step!

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
sKsMudvayne
Lance Corporal
Posts: 20
Joined: Wed Aug 18, 2004 7:49 pm
Location: Canada, Ont.
Contact:

step by step!

Post by sKsMudvayne »

hey can anyone help me and putting a step by step guide in putting stock objects in stock maps SOLID.......i read some of the other forums and still confuses me........
Thy shall pay in blood
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post by strafer »

First of all, you need to have Pakscape and notepad.

Open up pakscape and open up pak5.pk3 in the main folder. Go to maps, dm (or obj), and find the map you want. (Make sure it's mapname.scr not mapname_precache.scr). Drag it into a different folder on your desktop.

Open up notepad (There is another way to edit the .scr file without using notepad and doing it in the game. Go to the Starred area with the title "Second Way of Editing the .scr File"). Go to file, open. Under files of type put all files. Open up the maps .scr file (This is where you may want to look at someone else's map mods just so you can get familiar with scripting. Everyone does this when they first start out). You will be scripting after the text "level waittill spawn". Make sure you are typing after that text and before the "end" text. For an example, I will be doing the map Southern France.

Go into your game and make your own server with Southern France as the starting map. Go to where you want to place,say a tank, and bring up your console (If you don't have your console enabled, go to the main screen and go to advanced options. It is the first checkbox on the top right. Check it and hit apply. The button to bring it up is ~, above the tab button,) and type "coord" without the quotes. You will get three categories of 3 numbers each: Origin, Angles, and Axes. You only need to copy down the origin and angles. Don't worry about the decimal part of the numbers unless you need it to be in THAT specific location. Now that you have the origin and the angles written down you can quit out of the game.

On notepad, you should have mohdm1.scr up. Like I said before, you will be placing the scripts before "end" and after "level waittill spawn"

You can make different types of entities for scripting. I will be using a simple one.

This is a simple script for placing a tiger tank in Southern France:

local.mytank = spawn script_model
local.mytank model "models/vehicles/tigertank.tik"
local.mytank.origin = (xxx xxx xxx)
local.mytank.angles = (xxx xxx xxx)
local.mytank solid


Save the .scr file and go to pakscape. Go to file, new. On the right panel, right click anywhere on the white section and go to object, new directory. Name that folder "maps" without the quotes. Open that directory up and create another directory within it. Name that folder "dm" ("obj" for objective) without the quotes. Open that folder up and place mohdm1.scr in there. Go to file, save as, and under the save as type make sure it is Quake 3 Pak (*.pk3) and save it as something like user - mymod.pk3. Save it in the main folder for Allied Assault and save it in the mainta folder for Spearhead. (Maintt for Breakthrough).

Go back into your game and create your server again with Southern France as the starting map. Go to where you placed your tank and see if it is there. If it isn't then you most likely made a typo (or you copied and pasted my script and I had a typo :oops: ). Just make sure everything is spelled correctly.

If it is there, then yay, you did it right. 8-)

*********************************************************
Second Way of Editing the .scr File
*********************************************************

This is a way to edit the .scr file from in the game (This is not what I prefer doing, but you may).

In the game, make a server and type in "edit script" in the console without the quotes and a box similar to notepad will appear. Do everything I previously told you to do. When you save the .scr file, it will be saved into the main>maps>dm for Allied Assault (obj instead of dm if it is an objective map), in the mainta>maps>dm for Spearhead, or in the maintt>maps>dm for Breakthrough.

Do the same steps to pak the file.

*********************************************************

Again, it is a good thing to do to get familiar with scripting by looking at other people's scripts. Just make sure you don't rip their script off (It's ok to use my example 8-) ).

Ok, that is a lot of typing...I really hope this helps. Good luck in your journey of scripting. 8-)

(If anyone notices a typo or any mistake please post to tell me).
Post Reply