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 / Doors with physics

Author
Message
hunter349
14
Years of Service
User Offline
Joined: 18th Jul 2010
Location:
Posted: 20th Jul 2010 07:04
I am trying to make a script that will push or pull a door open or closed by using the right mouse button. I am studying the script to dooruse but this is just a single action that opens the door. When you press the left mouse button you can pick up and throw entities and I have also been playing around with this to try and rotate a door on the y axis but I can't seem to rotate it from where the hinges would be. It only rotates around the center of the entity.

I would appreciate any help. Point in the right direction. Tell me I'm going about it completely wrong. Anything.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 20th Jul 2010 16:00
Well you could animate your own doors and hands (with a push motion), so they move in time and give the effect of the player reaching for the door and opening it.

Your signature has been erased by a mod. The sig needs to be 600 width maximum (x 120 height) for all of it.
hunter349
14
Years of Service
User Offline
Joined: 18th Jul 2010
Location:
Posted: 20th Jul 2010 17:21
yes but that would still just be a single action of opening the door.

The physics system in fpsc is capable of this I'm just not quite sure how to go about it.
Ocho Geek
17
Years of Service
User Offline
Joined: 16th Aug 2007
Location: Manchester, UK
Posted: 20th Jul 2010 20:00
you would need to make a slot and an object which fits near perfectly inside it, assuming the collision will let you

I love Cheese; It Fills Me With Glees,
My Tastebuds it please; oh yes, i love cheese.
Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 20th Jul 2010 21:09
You can check the location of the player to an entity via scripting and use that to move your door opening animation on a frames - by frames basis I guess. Then only applying the coloff once the player has full advanced the door animation.

Your signature has been erased by a mod. The sig needs to be 600 width maximum (x 120 height) for all of it.
hunter349
14
Years of Service
User Offline
Joined: 18th Jul 2010
Location:
Posted: 21st Jul 2010 00:03
rotatey=90
that will rotate the door but it rotates around the center of the entity. Does anyone know how I could get it to rotate from one side or the other? I'm getting close to this push pull door script working but having the door rotate around it's center is messing with it.
JRH
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 21st Jul 2010 00:49
I made something like this for a game once, I had a HUD display at each door with:
1)Open
2)Bash

Bash had the door bounce back, as I used srcipts to make it seem real.

Nbt
15
Years of Service
User Offline
Joined: 11th Oct 2009
Location: Behind you!!
Posted: 22nd Jul 2010 02:51
Does it not use the root centre of say the root bone?? if so you can just offset your doors beforehand in your modelling app.

hunter349
14
Years of Service
User Offline
Joined: 18th Jul 2010
Location:
Posted: 22nd Jul 2010 04:55
yea I'm pretty sure that's whats happening. I wanted to try and get around it without messing with the model itself. But I dont think I will be able to since the program has no idea what I want it to do.

A second thought I had though was to use the animation that the doors already have and make them scroll through it 1 frame at a time for every x increment that the mouse moves forward or backward. I'm not sure where to find the script language for mouse movement though.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Jul 2010 01:09
Could you not create a door spawner that would spawn one door in place of the door (along with some velocity for being bashed in) when the player bashes the door down? Delete the door itself and spawn in the entity (not segment door) with physics and whatnot.




The one and only,


Login to post a reply

Server time is: 2024-11-24 21:29:47
Your offset time is: 2024-11-24 21:29:47