Author Topic: Rocket mounting script - possible?  (Read 1523 times)

So, I'm making the rocket launcher from Iron Man. The one that he shoots at the tank with the tinyass rocket that explodes a couple seconds later? Yeah that one. I was wondering if a script would be possible that, when the rocket collides with the instance of the player object, it could mount onto it, or "stick" to it. Wherever the player moved, the rocket would move with it. Is this possible? It sounds possible. And also, if it is possible, could I have a small (not entire) example of a script that would do this, seeing as I'm fairly new to scripting and have absolutely no idea how to do this?

No. I will explain why.

A player has things on it called Joints, which are assigned to parts of the model, such as the hands and feet. The joints help the animation, and are the only points on the player that an object can be mounted to. The problem is that the player doesn't have 3000 joints all over it. There are only a couple. Therefore, you would have to mount the rocket on one joint, or find a script that can mount it to the nearest one, which I doubt there is.

Yeah, I knew about the joints, which is why I was afraid someone was gonna say what you said. Well, damn. Thanks for letting me know, Azerath. That really sucks... Oh well, back to the drawing board.

Double toast, but I have another idea.

Is it possible to create a script for a projectile that, when the projectile (i.e. rocket, grenade, etc.) nears the player, not collides with, but nears the player, it explodes? Like, some sort of "detection" code?

A perfect example of this would be the Plasmite RPG from Jak 3 if you've heard of/played it.

Most likely. I has seen a code that makes a projectile follow a player once it is in range of them.

I think I know what you're talking about, the Vector... The Vector... Uh, shoot, the last part of the name's escaping me at the moment, but yeah, that thing. Well sweet, I'll do that instead.


AHA, that's it, thanks. :cookieMonster:

Not trying to be annoying, but i believe this topic belongs under coding help..
Correct me if i am wrong though..

find a script that can mount it to the nearest one, which I doubt there is.
There is, just need to know some maths.

Check out Jookias box hit script.

It's packaged with Amades zombies.

I'm sure if you're a competent scripter, you can figure out what to do with that.

Well, I think you can make the projectile stick on the nerest joint then move it over to where is was with some maths.

I'm sure if you're a competent scripter, you can figure out what to do with that.

I'm a really good scripter, just fairly new to Torque is all. But from what you're saying, it sounds pretty simple.

Well, I think you can make the projectile stick on the nerest joint then move it over to where is was with some maths.

So, you're saying this is possible to some extent?

God

I assume Jookias box script returns the nearest joint from the contact point of the projectile -> player.

If so, you can just get the return value, and then mount it there. That's probably the best you are going to get without hacky/glitchy stuff.

Kyzor, I cannot reply to PMs, but if you have Steam I can help.