Jump to content
Sign in to follow this  
Prospero

Setvelocity and scripted fun...

Recommended Posts

Hi all,

The setVelocity command can be used on objects like a table or a pallette after all. It's just a little different from when applying it to cars and planes etc.

Say, for example, I was to execute this (where I have a table called "mytable"):

_o = mytable

_v = [0, 0, 15]

_o setvelocity _v

exit

You can think of this code as "priming" the table. It won't move, it'll just sit there. But, now shoot the table or drop a grenade on or near it - i.e. give it a bit of a bump. It will now react according to the velocity you gave it via setVelocity in the snippet above. Some very nice scripted explosion effects could be created this way.

Prospero

Share this post


Link to post
Share on other sites

Nope.

Objects like tables (with simulation-type "thing") seem to work differently from men. The setPos-up-a-bit trick doesn't appear to work for such objects.

But with this method, you could have "scripted" events where things fly out of windows after an explosion inside a building, for example.

Prospero

Share this post


Link to post
Share on other sites

So, now all that we need is an "invisible" projectile that could be dropped on the object so it would give it that necessary start impact so we shouldn't need to use explosions.

Hmm... how about a camcreated bullet or some other projectile? I think it's even possible to use setvelocity on it so it can be "shot" towards the object that needs the push.

Ideas, ideas...

Share this post


Link to post
Share on other sites

Yeah, although I think there may be other ways to give it that little bump (which I'm working on).

But that said, I've been wanting to know how to camCreate live bullets for a long time. I recall Dinger fairly recently mentioning that he thought it was possible, but I still haven't seen the actual command.

Prospero

Share this post


Link to post
Share on other sites

It's possible. I was camCreating a "bullet" and launching it. The thing would fly up into air and arch and there would be a continuous "line" (tracer) from the point of origin to its current location. It looked really funky. camCreating a small bullet inside an object to get it to fly is the best way to go (as someone mentioned). It even works in multiplayer. The other clients can't see the bullet but they still get the end result of the table flying into the air. I would createVehicle a Phone and setVelocity it, and then camCreate a Grenade on it and the Phone would go flying (not from Grenade but from setVelocity). I'm afraid I don't remember the wording for the bullets. I know one bullet was called "Cannon30HE".

Doolittle

Share this post


Link to post
Share on other sites

Good show Doolittle.

If you know any other bullet names please do post them!

Prospero

Edit:

Ooooooh this is good. The number of things one can do with this...

The strange way (straight line) that the tracer is drawn from point of origin to bullet makes sense once you start firing bullets at high speeds over long distances.

Share this post


Link to post
Share on other sites

So far, the following seem to work well (i.e. camCreate immediately followed by setVelocity):

cannon30AP

cannon30HE

cannon25HE

No bullets yet though, only cannon rounds. Post your findings, chaps!

Note - there seems to be no reason to have to use setDir.

Prospero

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×