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 / How to pick up objects like in Whispers?

Author
Message
KingMassen
7
Years of Service
User Offline
Joined: 23rd Dec 2016
Location:
Posted: 12th Jul 2018 13:57
The game called "Whispers" is made by FPS Creator and in the game, the player can pick up objects ,making them move to the screen and then you can rotate them by holding R key ,how do you do that in FPI script?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 15th Jul 2018 00:14
KingMassen I had some time today to play with this. You do know we already have where the player can "take" and object ? using the rmb or the T" key ???
But to get something to rotate was a challenge. Remember the "entrotate" command does not work ! Soooo.... here's what you have to do.
Make your "items" a character in the .fpe file (ischaracter =1) They must have at least one bone. Use the settings I made from the picture (attached)
Play with the items/entities weight and/or friction settings to get better results Let me know how it works for you
Here's how it works for me...

Here's the MainAI script for item to pickup.... also adjust the "floatrate" setting to change height.
My games never have bugs. They just develop random features..
Lots and lots of random features...

Attachments

Login to view attachments
seppgirty
FPSC Developer
15
Years of Service
User Offline
Joined: 3rd Jul 2009
Location: pittsburgh, pa.
Posted: 15th Jul 2018 21:03
some nice scripting there ncmako.
gamer, lover, filmmaker
KingMassen
7
Years of Service
User Offline
Joined: 23rd Dec 2016
Location:
Posted: 18th Jul 2018 06:04 Edited at: 18th Jul 2018 06:07
This inspired me ,and the character entity thing would help a lot!

I think I would also try with "freefromplr" and "linktoplr" commands as you said in the other thread ,along with "plrdisable" to hinder the player's movement

Thanks
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 27th Jul 2018 11:43 Edited at: 28th Jul 2018 18:05
KingMassen I had some time to look at this again, I remembered an internal variable for controlling entities.
*** Script and video updated below
My games never have bugs. They just develop random features..
Lots and lots of random features...
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 28th Jul 2018 18:02 Edited at: 28th Jul 2018 18:04
I noticed I had a typo in the script posted above ( mousestate=1 instead of mousestate=2 )
But it still came with problems, seems the script didn't allow for the RMB click ???

I have since reworked the script and it now functions as is should. Player can either press "T" or RMB click
to pickup any dynamic item, press "R" to rotate and then place back with either "T" key or RMB.
I did notice it's best to keep entities weight around 500-1500. More than that and it falls or slides away when placing back

My games never have bugs. They just develop random features..
Lots and lots of random features...
xren4ig
12
Years of Service
User Offline
Joined: 4th Mar 2012
Location:
Posted: 30th Jul 2018 17:49
Hi to all. This is script
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 30th Jul 2018 22:58
@ xren4ig Thanks, that's now you did it Very nice script.
You also "scaled" it up, now I see.
My games never have bugs. They just develop random features..
Lots and lots of random features...
fufps
6
Years of Service
User Offline
Joined: 8th Sep 2018
Location: Somerset, NJ
Posted: 16th Sep 2018 21:07
Is it possible to pick up objects with the arrow key?
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 17th Sep 2018 10:58
@ fufps
Quote: " pick up objects with the arrow key"

I don't think so, as the "T" key & RMB are already hard coded for picking up items.
My games never have bugs. They just develop random features..
Lots and lots of random features...

Login to post a reply

Server time is: 2024-11-23 08:08:49
Your offset time is: 2024-11-23 08:08:49