OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: fri000 on 12 Oct 2003, 04:27:09
-
Does anyone know if there's any possible way of setting the pitch of a missile that was created using the camCreate command?
...or maybe some other way of making the same effect? ???
-
I don't think this is easily done, if it can be done at all :-\ .
-
Many a scripter has pondered this question before, but I don't think anyone has yet found the answer.
I haven't tried it, but maybe by using a combination of setvelocity commands in different directions, you could sort of shake the object until it faces the right direction. That or you could create an object underneath the falling object so that the falling object has to roll a bit to get off it. Wouldn't work with missles though, I suppose.
-
i think i found an efficient way of doing it..
in this twisted metal type map im making im trying to get a dune buggy to shoot a missile after picking up a 'power up' type thing. Creating a missile using camCreate above the buggy and have it fly forward was fairly simple. But i ran into a problem that if the buggy is on a hill driving upward and tries to shoot the missile it will end up blowing it self up. It's obvious that the missile just flies into the hill instead of up at the same angle as the buggy.
What helped me out with this was a GetPitch/GetBank function i found on this site. It seems that if i set the missile's z velocity to the buggy's pitch the missile will fly at the right angle (although it wont be facing the way its flying, which does look a bit odd). :P :)
-
Yeah, I had to this with one of my scripts for the Nightstalker Mod...The effect looks somewhat mediocre, but it's the best I can do with what's available.
-
thanks for not telling me it before :beat:
-
Well, you never really specified that you really just wanted a way to make a missle travel in a certain direction. SetPitch sort of implies that you want to change the (must I say it?) pitch of an object, such as making a plane tilt it's nose downward. ;D