Page 1 of 1
need help with adding weapons with .scr Single Player
Posted: Thu May 31, 2007 12:29 am
by erick
I tried to make my player start on one of my SP levels with a gun but I dont know how to code this
could anyone tell me?
i am new to mapping so I dont know that much
any help would be appreciated
Posted: Thu May 31, 2007 12:39 am
by lizardkid
You need a .scr file for your map. Make a .txt file and name it the
exact same name as your map. Put it in the main>maps folder. Then put this code into the .txt file and save.
Code: Select all
main:
level waittill prespawn
level waittill spawn
thread giveGuns
end
giveGuns:
$player item weapons/colt45.tik
$player item weapons/thompsonsmg.tik
$player ammo pistol 1000
$player ammo smg 1000
end
valid weapons are...
- colt45
p38
m1garand
kar98
thompsonsmg
mp40
bar
mp44
bazooka
panzerschreck
shotgun
and ammos
- pistol
rifle
smg
mg
heavy
loadout
Posted: Thu May 31, 2007 1:17 am
by tltrude
In pak0 look at global/loadout.scr .
$player useweaponclass smg
"Useweaponclass" is the weapon the player starts with.
In Lizardkid's example it would look like this, if you want the thompson.
Code: Select all
main:
level waittill prespawn
level waittill spawn
thread giveGuns
end
giveGuns:
$player item weapons/colt45.tik
$player item weapons/thompsonsmg.tik
$player ammo pistol 1000
$player ammo smg 1000
$player useweaponclass smg
end
The use weapon class names are:
smg
rifle
pistol
mg
The player must have the item before it can be used.
Posted: Thu May 31, 2007 7:11 pm
by erick
thanks for the help
it worked