pick up sniper

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
bluelamb
Corporal
Posts: 40
Joined: Wed Jun 25, 2003 3:18 pm

pick up sniper

Post by bluelamb »

Hi folks,
I have a single player level in which I want the player to start with a normal rifle and then pick up a sniper rifle along the way.
How can I do this?

I have placed a playerweapon in the map but the player can't pick it up...

any help appreciated!
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Sniper rifle

Post by tltrude »

You may have used the wrong sniper rifle. There are ones that are only for show. So find the one you can pick up, then the player can switch between the two rifles by hitting key 2 more than once.

He can also pick one up from a dead enemy sniper.
Tom Trude,

Image
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

Yeah but if he still has the normal rifle, he'll just get ammo... :(
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

well

Post by tltrude »

Well, I remember doing it, but i don't think my player had a rifle at the start of the level. So maybe one rifle has to be Axis and the other Allied.
Tom Trude,

Image
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

You mean to pick them both up? Nah, because like in m3l3, I have a allied sniper, and I pick up mausers, but I just get the ammo.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

As I recall

Post by tltrude »

As I recall, I picked up a kar98 from a dead enemy and then a springfield that was leaning against a wall and I could use them both by hitting key 2 to switch between them. The load out for the start of the level looked like this:

Code: Select all

	else
		if (level.script == "maps/testsky3.scr")
		{
			$player item weapons/silencedpistol.tik
			$player item weapons/steilhandgranate.tik
			$player item weapons/ThompsonSMG.tik
			$player item weapons/shotgun.tik

			$player ammo pistol 40
			$player ammo rifle 15
			$player ammo smg 120
			$player ammo grenade 5
			$player ammo shotgun 80

			$player useweaponclass smg
		}
Tom Trude,

Image
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

Hmm, since the springfield was against the wall, maybe it was scripted, like you touch a trigger and you are given the springfield through script... thats how it's done in I think it was m4l2 where you pick up a kar leaning against sandbags.
bluelamb
Corporal
Posts: 40
Joined: Wed Jun 25, 2003 3:18 pm

snipe

Post by bluelamb »

I think the only way is to start without a rifle at all then pick up the sniper rifle but whats to stop a player from picking up a normal rifle from a fallen foe (how poetic!) before reaching the sniper thus stopping him/her from being able to pick it up?

Think I just confused myself... :wink:
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

$dontpickme dontdropweapons
bluelamb
Corporal
Posts: 40
Joined: Wed Jun 25, 2003 3:18 pm

thx

Post by bluelamb »

Thanks for that!
Post Reply