# 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 / Help script pickup/drop entity ( pickupcandrop.fpi )

Message
Posted: 19th Mar 2017 05:07
Hi everyone i need some help

There is a ready script to pickup/put entity here it is :

;Artificial Intelligence Script

;Header

desc = Pickup Item (can drop - press H) [MUST USE PHYSICS ALWAYS ON]

;Triggers

:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupanitem.tga,hudname=itemprompt,hudhide=1,hudmake=display,state=10,coloff
:state=10,plrdistwithin=40:state=1,playertake,plrsound=$0,hudshow=itemprompt,hudfadeout=itemprompt ;playerdrop when press H key causes an automatic increment of the state value :state=1,scancodekeypressed=35:plrsound=$1,playerdrop

:state=2,plrdistfurther=45:state=10

;End of Script

When use this script to the entity is taken from the floor and when pressing the H button, nothing happens.
Who knows how to make the entity was taken from the floor and pressing the button H is drop entity on the floor.

Here is the script file
Posted: 19th Mar 2017 21:55
Hi nnn, and welcome
First, what kind of entity is the player picking up? An item or a weapon?
But try this and see if it works, I change it a bit. Also, make sure in the entities
property setting, "Always Active" is set to YES !!! or it wont work
+ Code Snippet
My games never have bugs. They just develop random features..
Lots and lots of random features...
Posted: 21st Mar 2017 20:25
Thanks and how to make entity drop and explod after 10 second ?
Posted: 22nd Mar 2017 16:02
I tweaked ncmako's script a bit. Keep his settings as said but also change explodable to yes.
+ Code Snippet
As always, Game on! -2S!K Productions
Posted: 24th Mar 2017 20:10
Thank you very much, it's cool.
Posted: 25th Mar 2017 00:30
No problem.
As always, Game on! -2S!K Productions

Login to post a reply

Server time is: 2017-09-20 08:45:44
Your offset time is: 2017-09-20 08:45:44