I was wondering how to make a vase in my map fly into the air and to a specific position (as if being thrown by a ghost) after I trigger it to become active when I step into a certain area? I got the triggering to become active part down, but I don't know how to make it fly when I enter my script area. Any help?
If you mean thrown spining in the air them just give it a impulse force using the physics system just like FG did with the iron maiden doors. If you mean flying strait to other point like a near table or something them imo you will need to animate it on a 3d app and them call that animation in a script.
(09-16-2010, 12:17 AM)Argoon Wrote: [ -> ]If you mean thrown spining in the air them just give it a impulse force using the physics system just like FG did with the iron maiden doors. If you mean flying strait to other point like a near table or something them imo you will need to animate it on a 3d app and them call that animation in a script.
Yeah it doesn't necessarily matter where it goes, I just want it to fly to another part of the room it's in so it looks like it was tossed... How do you set up the addbodyimpulse function? I tried but couldn't figure out what to put in past the part where I enter in the entity's name?
(09-16-2010, 12:27 AM)Argoon Wrote: [ -> ]http://www.frictionalgames.com/forum/thread-4379.html
Try the link above.
Oh yeah I've seen that thread, but they nowhere mention what is put into each field "void AddBodyImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem);". All I know is that in the "string& asName", I put in the entity's name, but I've tried putting in different numbers for each of the "float afX, Y, Z's" and nothing happens - it could be due to the fact that I don't know what to put into the "string& asCoordSystem" field... Any ideas? Also, what is the entire string put under? StartOn, OnEnter, or nothing? Thanks...
Can't help you sorry i'm no coder
(09-16-2010, 12:48 AM)Argoon Wrote: [ -> ]Can't help you sorry i'm no coder
Ok, thanks anyways. Is there anyone else who can point in the right direction?
Anyone daring enough to help me with this code?
EDIT: Looks like I figured it out on my own, thanks anyways...
If you could tell what you did I would love to know.
I guess coord system would be local or global?
Ok so what you do is add "AddPropImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem);" into your script file, replacing the "string& asName" with the name of the entity in question, and replace the "float afX, float afY, and float afZ" with the amount of force (in numbers) you wish to have applied to the entity in that direction, and leave the "string& asCoordSystem" as "".
So, for instance, with one of my objects it looks like this: AddPropImpulse("crossboo_1", 0, 0, -2, "");
EDIT2: Oh, and make sure that the string is put under (without quotations):
"void OnEnter()
{
}"
Hope that helps!
EDIT: Oh and if you don't mind, give me an Internet if it helped!