Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Need some help with flying body.
ammislol Offline
Junior Member

Posts: 24
Threads: 6
Joined: Feb 2012
Reputation: 0
#1
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
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
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.

Tutorials: From Noob to Pro
02-18-2012, 11:54 AM
Website Find
ammislol Offline
Junior Member

Posts: 24
Threads: 6
Joined: Feb 2012
Reputation: 0
#3
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
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
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.

Tutorials: From Noob to Pro
02-18-2012, 02:15 PM
Website Find
ammislol Offline
Junior Member

Posts: 24
Threads: 6
Joined: Feb 2012
Reputation: 0
#5
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
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
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
Find
ammislol Offline
Junior Member

Posts: 24
Threads: 6
Joined: Feb 2012
Reputation: 0
#7
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
Find




Users browsing this thread: 3 Guest(s)