ammislol
Junior Member
Posts: 24
Threads: 6
Joined: Feb 2012
Reputation:
0
|
Need some help with flying body.
Hello there. I've got some problems.
I understand how to make the body fly normal, but I want a script that makes the body fly out of a closet. Cause I can't make it work, the body wont fly out, just kinda stays in the closet.. Is there anyone out there that wanna help me with the script?
I have a area called : FlyingJesus_5
I have a body called : Jesus_5
I have a closet called : Closet_5
If you need that.
Thank you // Ammislol.
|
|
02-18-2012, 03:56 AM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Need some help with flying body.
If the mass and force of an object is not enough to push something open, then you're going to have to do it for it. For most objects AddPropForce will suffice in launching the object.
|
|
02-18-2012, 11:54 AM |
|
ammislol
Junior Member
Posts: 24
Threads: 6
Joined: Feb 2012
Reputation:
0
|
RE: Need some help with flying body.
(02-18-2012, 11:54 AM)Your Computer Wrote: If the mass and force of an object is not enough to push something open, then you're going to have to do it for it. For most objects AddPropForce will suffice in launching the object. The thing is, I have AddPropForce, but the doors of the closet wont open. Do I have to do anything with the closet? Or just add more to the AddPropForce?
|
|
02-18-2012, 01:37 PM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Need some help with flying body.
(02-18-2012, 01:37 PM)ammislol Wrote: The thing is, I have AddPropForce, but the doors of the closet wont open. Do I have to do anything with the closet? Or just add more to the AddPropForce?
Try AddBodyForce, then. Open the entity in the model editor and find the name of the bodies that make up the doors. Then, for AddBodyForce's object name, separate the entity name and the body name with an underscore (e.g. EntityName_BodyName). Do so for each door of the closet.
|
|
02-18-2012, 02:15 PM |
|
ammislol
Junior Member
Posts: 24
Threads: 6
Joined: Feb 2012
Reputation:
0
|
RE: Need some help with flying body.
Okay, I've got another question for you if you dont mind.
I have a secret wall, with a painting infront of it, when you remove the painting you see the key. I want when the player pick up the key a head / corpse to show up and the sound - 12_girl_scream.snt will come. Is that possible? If you understand what I mean..?
Thank you.
|
|
02-18-2012, 03:49 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Need some help with flying body.
void OnStart()
{
SetEntityPlayerInteractCallback("key", "Scare1", true);
}
void Scare1 (string &in asEntity)
{
SetEntityActive("Head/Corpse", true);
PlaySoundAtEntity("", "
12_girl_scream.snt", "Player", 0, false);
}
(This post was last modified: 02-18-2012, 04:06 PM by flamez3.)
|
|
02-18-2012, 04:06 PM |
|
ammislol
Junior Member
Posts: 24
Threads: 6
Joined: Feb 2012
Reputation:
0
|
RE: Need some help with flying body.
Thanks alot mate!
(This post was last modified: 02-18-2012, 10:25 PM by ammislol.)
|
|
02-18-2012, 04:26 PM |
|
|