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 / Press F to pick up health pack?

Author
Message
Muzzles56
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Ireland
Posted: 3rd Jul 2013 18:33
I can't remember where I found this script, but here it is



I know it's called "Weapon Pickup" but it seems to work for other things, but not health packs. I don't know anything about scripts, but by looking at the script, it mentions "playertake" so I would assume this would work, but does not. What do I add to this to make a functional health pack that works with the F key?

Specs: AMD FX-8120 8-Core Processor (3.1GHz) / Radeon 7770 / 16GB RAM / Windows 8 Pro 64 Bit

DozenRooms: http://gamejolt.com/games/other/dozenrooms/15041/
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 3rd Jul 2013 20:09
Hi Muzzles56
First this is a scripting question.
Try the stock "pickphealth.fpi" script and change it to..

Don't forget to add your hud so the player knows to press "F"
Anubis
12
Years of Service
User Offline
Joined: 6th Nov 2012
Location: Netherlands
Posted: 3rd Jul 2013 20:16
Howdy,

I would add a third line to ncmako's script

Else im afraid if you do NOT pick it up, the engine keeps waiting for scancodekeypressed even if you are on the other side of the level.
Correct me if im wrong please

Grts,
Anubis

-+- There are only 10 types of people in the world. Those who understand binary, and those who don't -+-

[Chipset:X58 CPU:i7.950.64 GPU:HD5970 RAM:12GB DDR3 WIN:7.x64 PRO FPSC:1.20.10]
Muzzles56
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Ireland
Posted: 3rd Jul 2013 20:16
I should really learn this scripting language...

Specs: AMD FX-8120 8-Core Processor (3.1GHz) / Radeon 7770 / 16GB RAM / Windows 8 Pro 64 Bit

DozenRooms: http://gamejolt.com/games/other/dozenrooms/15041/
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 3rd Jul 2013 20:30
@ Anubis
You are so right Good catch.
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 6th Jul 2013 19:55 Edited at: 6th Jul 2013 19:56
Quote: "I know it's called "Weapon Pickup" but it seems to work for other things, but not health packs."


The script can be altered to pick any dynamic entity up. Both Ncmako and Anubis are correct in their script. We have health pickups that require the player to press a key first. It works the same for any item we use.

For example...



This is a simple script we use for pistol ammo clips. It gets attached to the main script of the ammo.We can alter it to fit health packs, weapons, briefcase, flashlight- anything.


There's no problem that can't be solved without applying a little scripting.

Login to post a reply

Server time is: 2024-11-23 14:25:00
Your offset time is: 2024-11-23 14:25:00