Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
this could be interesting
Author Message
THE/ILL/WILL Offline
Junior Member

Posts: 11
Joined: Dec 2010
Reputation: 0
Post: #1
this could be interesting
Ok so what im trying to do is as the player is watching a chair is going to be laying on the ground and im going to use a basic collide callback well what i want to happen is the chair to flip up and slide into a desk like a ghost did it Smile i tinkering with a few lines right now but nothing im doing is working so far so if anyone has any tips for on which script functions would work i would be vary willing to post a video of me dancing to shakera as payment... im a vary tall VERY white man, always funny Smile
(This post was last modified: 01-19-2011 03:38 AM by THE/ILL/WILL.)
01-19-2011 02:34 AM
Find all posts by this user Quote this message in a reply
Equil Offline
Member

Posts: 94
Joined: Sep 2010
Reputation: 0
Post: #2
RE: this could be interesting
The function you're looking for is probably AddPropImpulse.

Heres the syntax:
AddPropImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem);

asName: The prop's name for the impulse to applied to, in this case the chair.

float afX: Impulse applied on the X axis, can be negative of positive values

float afY: Impulse applied on the Y axis, Y axis is always up and down, positive for up, negative for down

float afZ: Same properties as the X axis

asCoordSystem: Co-ordinate system to be used, in this case just use "world"

You'll need to experiment with and use a combination of values to get the right about of impulse you want. If you look in the editor you can see which directions the axises are by the coloured lines:

Red: X axis
Blue: Z axis
Green: Y axis

Hope this helps.
01-19-2011 03:13 AM
Find all posts by this user Quote this message in a reply
THE/ILL/WILL Offline
Junior Member

Posts: 11
Joined: Dec 2010
Reputation: 0
Post: #3
RE: this could be interesting
ya that is what i was trying to use but on my first try all im able to do is slide the chair of fip it but none of the movements a precise enuff.
01-19-2011 03:42 AM
Find all posts by this user Quote this message in a reply
Equil Offline
Member

Posts: 94
Joined: Sep 2010
Reputation: 0
Post: #4
RE: this could be interesting
Then you'll just need to keep experimenting with the values.
01-19-2011 03:52 AM
Find all posts by this user Quote this message in a reply
Andross Offline
Junior Member

Posts: 38
Joined: Oct 2010
Reputation: 0
Post: #5
RE: this could be interesting
Easy Peasy.
What you need is a Sticky Area.
Put its center wherever you want the chair to end up standing.
Then, when your event is triggered, push the chair towards that area via AddPropForce() or something equivalent.
Make sure that the area is large enough so that the chair will collide with it.
Done Smile
01-19-2011 06:26 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)