Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / A NPC giving player a gun

Author
Message
Turtle Productions
16
Years of Service
User Offline
Joined: 22nd Jan 2009
Location: Finland
Posted: 3rd Dec 2010 19:53
Hi. I was making a script where a non-player character gives the player a gun what the NPC has, when return is pressed.
But I got stuck because I don't know what code just gives the entity's gun to player. I bet this kind of has been made in FPSC (nazi-zombies weapon-buying)

Thanks,
TP
Plystire
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 3rd Dec 2010 22:00
As fara s I'm aware you can't take the weapon away from the character entity unless he's dead.

You can, however, have the player receive a weapon through scripts without the player needing to go pick it up.

Place the desired weapon somewhere in the level and give it a script that, upon activation, is given to the player (regardless of distance from the player). Then all you'll need to do is have your character entity's script activate the weapon entity to have it given tot he player.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.
Turtle Productions
16
Years of Service
User Offline
Joined: 22nd Jan 2009
Location: Finland
Posted: 4th Dec 2010 11:35
Ooh, Plystire, you're so awesome!
Thanks a lot!

Thanks,
TP

Login to post a reply

Server time is: 2025-06-04 20:52:00
Your offset time is: 2025-06-04 20:52:00