Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → VectorSub()?
VectorSub()?
2000-11-23, 7:21 AM #1
Arrgh.. trying to get this pilotable rail det to work..

This attempt does nothing in-game:
Code:
pulse:

SetThingLook(rail, VectorSub(GetThingPos(rail), GetThingPos(player)));

Return;


This attempt allows you to steer left/right, but not up/down. If the rail det is traveling at an up/down angle other than level (straight), it will straighten itself out after a second or two:
Code:
pulse:
ApplyForce(rail, GetThingLVec(player));

Return;


-Jipe
2000-11-23, 1:24 PM #2
i made a cog that does this about half a year ago....this is the basics of it, if you want the whole cog i'll send you it.....

dir = VectorAdd(GetThingLVec(player), GetThingLVec(dummy));
SetThingLook(dummy, dir);
dir = VectorScale(GetThingLVec(dummy), misslespeed);
SetThingVel(dummy, dir);
puller = FireProjectile(player, projectile, -1, -1, '0 0 0', '0 0 0', 0, 0, 999, 999);
SetThingCurGeoMode(puller, 0);
SetCollideType(puller, 0);
SetThingVel(dummy, VectorScale(GetThingVel(puller), correctionspeed));
SetLifeLeft(puller, 0.01);


------------------
I refuse to have a battle of wits with an unarmed person.
2000-11-23, 1:30 PM #3
and so you know, the firing of a second projectile is so you can steer it up and down. GetThingLVec doesn't return head pitch (dumb JK) so this was really the best way to do it. and yeah that's all in a pulse with a ton of other stuff but that's the only code which really guides the missle, rest was for a mod, and the mod was all in the cog (i refuse to edit and add templates if i can avoid it) so no one ask about the other lines there on the second projectile. so hope that helps.

------------------
I refuse to have a battle of wits with an unarmed person.
2000-12-01, 3:28 AM #4
Scorpion, could I have your cog, please?

------------------
You ought to know Mr. Mistoffelees
The Original Conjuring Cat-
(There can be no doubt about that)
Please listen to me and don't scoff
All his Inventions are off his own bat
There's no such Cat in the metropolis;
He holds all the patent monopolies
For performing surprising illusions
And creating eccentric confusions...

-T.S. Eliot in Old Possum's Book of Practical Cats
2000-12-02, 2:46 PM #5
sure, it has been sent

------------------
I refuse to have a battle of wits with an unarmed person.

↑ Up to the top!