Using effects to accelerate objects

This if for tutorials and information for the community to use for great works.
Keep them organized now!..
Post Reply
User avatar
CaptainPoopface
Posts: 714
Joined: Sat Feb 16, 2008 5:47 am

Using effects to accelerate objects

Post by CaptainPoopface »

There are a couple of effects in H2 that are used to accelerate objects, such as when you break open the air canisters on Headlong, or when you fire the Scorpion turret. By using markers and a bit of trickery, you can do any of the following things:

- Thrust yourself forward (grappling hook)
- Yank an object or enemy toward you, Scorpion-style ("GET OVER HERE!")
- Shoot someone straight up, or backward, or down
- Make your biped temporarily run faster
- Create a weapon that gives you an extra high jump, but with limited ammo
- Give boost to any vehicle (the warthog is incapable of proper vehi boost)
- Make a grav gun...

Go to the effect for the scorpion's cannon_fire. It's the first scorpion effect in the list. Change the marker from cannon_flash to whatever direction you want the acceleration to go. The Havok engine has a few markers that are always available to you, and these are the ones we'll use: forward, backward, up, and gravity (down). For this tutorial, I've changed the marker to forward. Click the marker name, scroll to empty white space, type the new marker name, click the dropdown box again, and select the marker you just typed. Then click Save.

I've also changed the effect duration to 0.05, because it's a little easier to work with. This will determine how long the acceleration lasts. You will be adjusting it later.

Image


Now scroll down to the Accelerations reflexive. The acceleration value is the key. I'd recommend setting it at 1 for starters (2 is a strong force, for moving the entire scorpion). Leave the inner and outer cone angles at 0.

Image

Null all the dependencies of the cannon_fire effect so that you do not have the obnoxious smoke and flashing and noise when you move an object.


Now pick a projectile that you want to use to apply the acceleration. I've chosen the plasma pistol bolt. In the list of reflexives, you will see a slot for Impact Effect. This effect occurs whenever the projectile hits something. It is almost never used, but hoooooo boy are we going to use it. Swap this to the scorpion's cannon_fire effect. Now, when you shoot something with a plasma pistol bolt, it will accelerate forward!

Image

Adjust the effect duration and the acceleration value to get the desired outcome. It takes a lot of trial and error. Do you want a sudden, very strong force, or a slightly weaker force that lasts a long time? You decide. This is another one of those times when you will desperately wish for RTH.

Some important notes about using effect acceleration:
- Accelerations do not add! If you shoot an object twice with a 0.5 acceleration, it's acceleration is....0.5. This means there is a threshold force you must exceed before an object will move at all.
- The object must have a phmo, or it won't be moved.
- The force acts precisely along a vector, at the point of impact. This is quite different from jpt forces, which radiate spherically outward from the point of impact. Why is this important? When you try to move most objects, they will spin wildly. It is as though you are pushing with an invisible finger at exactly the point where you shoot the object, so if it's not the exact center of the object, there will be a net moment about the center of gravity (i.e., it's going to spin).

It would be nice to work around this. You could try giving an object very high XYZ moments of inertia in the phmo tag, or shoot a big net of projectiles like the shotgun to minimize spinning.

- Bipeds have something in their phmo (or elsewhere) that does not allow them to spin when they are acted on by forces, so it's much easier to move bipeds than blocs. However, they have high friction forces when in contact with the ground. This means it's much easier to move someone in midair than while he is on the ground. If you want to move bipeds, I recommend using a projectile that explodes on impact, such as the banshee bomb. Make the impact effect accelerate up, and make the detonation effect accelerate forward/backward (duplicate the scorpion cannon_fire effect and change the marker). That way, the biped will be lifted off the ground first, then moved in the direction you want. Alternately, you can clone the Accelerations chunk in the effect and give it another marker.

- In the jpt for the projectile you are using, be sure to set the force to 0 so that it does not interfere with the effect acceleration.

- This method is SLC between any player and the host, but off-host to off-host is not yet tested.
User avatar
Gary
Posts: 1946
Joined: Thu Feb 14, 2008 10:17 pm
Location: USA, FL
Contact:

Re: Using effects to accelerate objects

Post by Gary »

Thank you, i've been wanting to make my hog "jump"
User avatar
DemonicSandwich
Trollwich
Posts: 1620
Joined: Sat Dec 08, 2007 9:47 pm
Location: I...huh...I don't really know. x.x

Re: Using effects to accelerate objects

Post by DemonicSandwich »

gjsdeath wrote:Thank you, i've been wanting to make my hog "jump"
I see you figured out the tire thing gjs. :wink:
Model Customization Pt.01|Model Customization Pt.02|Bipd Attachments|True Marker Rotations
"I'm the h4x man! Skibby Dibby Dib YoDahDubDub, YoDahDubDub"
User avatar
Dragonfire
Posts: 1328
Joined: Thu Feb 21, 2008 9:20 pm
Location: Michigan, USA
Contact:

Re: Using effects to accelerate objects

Post by Dragonfire »

Hmmm, i see a lot of potential for this, such as........

Hey CP, wanna help me with a mod using this method? ;)
Image
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Using effects to accelerate objects

Post by JacksonCougar »

I approve of this thread.
User avatar
socrates
Posts: 565
Joined: Tue May 27, 2008 9:22 pm
Location: Oklahoma

Re: Using effects to accelerate objects

Post by socrates »

remove bones of tires and suspension on hog...or replace them with something else...and make the warthog horn have an effect that will give the hog lift...
then have a second trigger use the L button and have another effect accelerate the hog forward...
a good skin and some other things could make quite the futuristic hover-hog
User avatar
Gary
Posts: 1946
Joined: Thu Feb 14, 2008 10:17 pm
Location: USA, FL
Contact:

Re: Using effects to accelerate objects

Post by Gary »

socrates wrote:remove bones of tires and suspension on hog...or replace them with something else...and make the warthog horn have an effect that will give the hog lift...
then have a second trigger use the L button and have another effect accelerate the hog forward...
a good skin and some other things could make quite the futuristic hover-hog
Not a bad idea, the Real mod i'm working on is Flying Vehicle based, so i need any flying vehicles possible:
Italic text= maybe
Pelican
Banshee
Gravity Throne
Jet Pack
Hover Hog
User avatar
DemonicSandwich
Trollwich
Posts: 1620
Joined: Sat Dec 08, 2007 9:47 pm
Location: I...huh...I don't really know. x.x

Re: Using effects to accelerate objects

Post by DemonicSandwich »

gjsdeath wrote: Not a bad idea, the Real mod i'm working on is Flying Vehicle based, so i need any flying vehicles possible:
Italic text= maybe
Pelican
Banshee
Gravity Throne
Jet Pack
Hover Hog
I just had some awesome ideas for that hover hog...
Model Customization Pt.01|Model Customization Pt.02|Bipd Attachments|True Marker Rotations
"I'm the h4x man! Skibby Dibby Dib YoDahDubDub, YoDahDubDub"
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Using effects to accelerate objects

Post by OwnZ joO »

This is something like how the gravity gun was made by that one guy on halomods correct? I know it used some kind of effect or something, but I think it was more like an air strike.
xxpenguinxx
Posts: 1974
Joined: Sun Jan 27, 2008 4:50 am

Re: Using effects to accelerate objects

Post by xxpenguinxx »

I was messing around with this and I got almost perfect ragdolls for getting sniped.

You shoot someone's back and their center body gets pushed a little, you shoot their shoulder they spin some, you shoot their foot and they trip.
But a shot would ragdoll them no matter where you hit so to finish the person you shoot the limp body. I shot the one guy in the head when he was down and he twitches as the blood sprays.
DemonicSandwich wrote:See that? You see that how it is highlighted down here but it's not highlighted right there? Ah, I guess that's what I get for pirating it.
In Soviet Russia, DS touches you. Say it again and I'll do more than touch. ~DS -Oh baby
A cat was licking itself to the sound of potato chips.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Using effects to accelerate objects

Post by XZodia »

OwnZ joO wrote:This is something like how the gravity gun was made by that one guy on halomods correct? I know it used some kind of effect or something, but I think it was more like an air strike.
no, that used a different method...but zomg...this would be capable of making a perfect gravity gun =O
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
socrates
Posts: 565
Joined: Tue May 27, 2008 9:22 pm
Location: Oklahoma

Re: Using effects to accelerate objects

Post by socrates »

DemonicSandwich wrote:
I just had some awesome ideas for that hover hog...
...
pm me? i would like to collaborate as well...
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Using effects to accelerate objects

Post by JacksonCougar »

Just used your tutorial to success, thank you. Moved.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Using effects to accelerate objects

Post by Click16 »

Congrats CP, Your tutorial has been moved to teh tutorials section! (the tut worked for me too!)
Post Reply