oOKyeOo wrote...
Now... im trying to make the propellers "twirl" and i alreaday have them doing that in Gmax (using nwmax of course) but i seem to be missing the "activate" "deactivate" part, what should i do to get my proppellers to work?
I did something similar a while back. You can check it out below and download the actual demo
here:
So using the same method for an activating placeable, here are the animation names (and some sample frame ranges) you must to add on the model base so NWN knows it's got them::
off 0-2
off2on 10-40
on 50-52
on2off 60-90Normally, Off is your default state and you aren't doing anything but you could put animation in there if you wanted. However, when the placeable is activated via NWScript it's going to "tween" the object positions/rotations (whereever they happen to be during the Off animation) into the off2on animation and that could look a little strange and non flying ship-like.
What I might consider, if I were you, is breaking this up into several special-purpose placeables. For instance, if you want one lazily cruising over the city just make it do that, give it a
default animation name (instead of those I list above) and a framerange that covers the entire circuit and when you create that placeable it will continue to make that circuit over the city forever. Something like
this would be a quick way to accomplish that sort of thing. However, if you do a
large orbit the airship may actually be invisible to the players underneath it because they are so far away from the model base (which it is orbiting around) that the engine doesn't bother to show it. That's a real concern so you might want to do some testing to see how far you can get away with.
Then for the docking make a
separate airship placeable which you can create then activate (like I do in the land-n-takeoff demo) shortly after creation. Create it via NWScript (Off), activate it a second later so it flies down from the sky and lands/docks (Off2On), is staticly docked (On), then pulling away from the dock and flying up into the air where it will be destroyed shortly afterward (On2Off). You can see exactly how that works in the demo I link to and load up the model in NWMax and look at the aurora base to see how I do things.
If you break your placeables down into more specific tasks the job is going to go waaay faster.
Here's a sample script to add to a lever's OnUse event (and change the tag below from MYAIRSHIP to whatever) to activate the placeable and get it to do it's stuff:
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
object oTarget;
oTarget = GetObjectByTag("MYAIRSHIP");
float fSpeed=1.0;
float fDurationSeconds=1.0;
AssignCommand(oTarget, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE, fSpeed, fDurationSeconds));
}im also curious to know if i can do multiple animations at once, per example i also want the airship to fly around in a repeating circle to give it the appearance that its well... actualy busy flying over a city.... is that possible to do with a placeable?
Like I said, breaking your task down into special purpose placeables is probably going to be potentially less heartbreaking. Sometimes I plan and plan out an object or animation and do it only to realize that NWN doesn't actually do things the way I thought and I have to redo the work. BTW, I was just thinking about it and between the tutorial video I link to and the land-n-takeoff demo video and example module/hak, I think everything you need is all in there.
And one last tip which I think is useful. I like to create a dummy node and attach it to the aurora base and then attach my airship model to the dummy node. Also means I can reuse the dummy node and model base and just slap another model on for the same effect.
Modifié par OldTimeRadio, 04 mars 2011 - 09:05 .