Shaking Player Camera

Post » Tue May 17, 2011 1:20 pm

Haven't been on these forums in a while!

Ok, here's what I wanna do:
I want to make it so the player's view (camera, whatever) is shaking, sort of like when an explosion goes off not too far away.

Only a certain area needs to be like this for a certain period of time, so originally the idea was to use actual explosions that were invisible, silent and did no damage. However, when I tried this by editing an explosion in the GECK, it seemed to break it. There was no shaking at all. Does anyone know how to apply only the shaking from an explosion to an area?

My preferred course of action now is to write a script and manipulate the player camera myself, however I don't know how to. I have an alright scripting knowledge, but no experience with Fallout 3 scripting. I was wondering if someone could tell me how I can do this.

Thanks in advance!
User avatar
Janeth Valenzuela Castelo
 
Posts: 3411
Joined: Wed Jun 21, 2006 3:03 am

Post » Tue May 17, 2011 7:16 am

Well, actually scripting the camera to rotate, would be difficult and take a while. I suggest making an Image Space modifier. Using some blur and double vision effects, and randomly changing it over the desired period of time, should make it appear the camera is vibrating and bad things are happening. Just make sure you have animatable checked, set it to the time you want. Then have it do several fades over that period, from one strength to another very rapidly. This is what they do ingame, aside from actually playing animations of the camera moving. (which you might be able to use, I just don't know what they are called)
User avatar
JESSE
 
Posts: 3404
Joined: Mon Jul 16, 2007 4:55 am

Post » Tue May 17, 2011 6:46 am

If I understand what you're wanting - the way bethesda does this is they put an invisible, silent explosion of sorts at the player. I can't recall just which, but they are there in the GECK. They use placeatme to spawn the explosion.
User avatar
Bambi
 
Posts: 3380
Joined: Tue Jan 30, 2007 1:20 pm

Post » Tue May 17, 2011 9:14 am

The easiest way to do this would probably be to use http://geck.gamesas.com/index.php/TriggerHitShader, assuming that's the effect you're looking for.

Cipscis
User avatar
Honey Suckle
 
Posts: 3425
Joined: Wed Sep 27, 2006 4:22 pm

Post » Tue May 17, 2011 3:43 am

The easiest way to do this would probably be to use http://geck.gamesas.com/index.php/TriggerHitShader, assuming that's the effect you're looking for.

Cipscis


Thank you all for your replies :) I tried it out, that's not the effect I was looking for. I can't believe my script worked first go without any trouble! Now I just need the right effect ;) I'll try and be clearer: I want the camera to move up and down, and maybe a little side to side, almost as though you were on a train or something. I'd prefer to script it myself rather than put invisible explosions everywhere. What I need to know is how to move the player camera around. I have no idea what the player view is called... would it just be like player.camera? Also, how could I make it so the camera moves over a set period of time? If I just went 'player.camera setpos y +5' wouldn't it just move the camera there instantly? I want to make it move there over a period of time ;)

Again, thanks for the help. I might use that TriggerHitShader somewhere else now I've seen what it does.
User avatar
Rik Douglas
 
Posts: 3385
Joined: Sat Jul 07, 2007 1:40 pm

Post » Tue May 17, 2011 4:18 am

TriggerHUDShudder sounds like what I want, but I can't seem to get it to work. Any wisdom someone could impart on how to use it would welcome :)
User avatar
Scared humanity
 
Posts: 3470
Joined: Tue Oct 16, 2007 3:41 am

Post » Tue May 17, 2011 4:41 pm

I want the camera to move up and down, and maybe a little side to side, almost as though you were on a train or something.


The times I've seen Bethesda do exactly this, they added a special scriptpackage to the player with a special 1st person animation.

Creating such an animation is going to be beyond virtually all of us, but you could try the ones Bethesda uses. The one I am thinking of here is something like mq08playercaptured . Some AI package named similar to that. You would add it to the player for a moment, to get the sway around and stuff, and then removescriptpackage to make the effect stop. When I used it in Foes Reworked, I had to use removescriptpackage a couple times because sometimes the first call of the function wouldn't get it off of the player.

But also - using a single explosion at the player could work for what you want. Put yourself in god mode and get something to fire a mininuke near you sometime. It really knocks the camera around, that effect, and it still seems to be to be like what you want. You don't need random explosions everywhere, its just one special type that is meant to shake the camera around and its placed at the player's location.
User avatar
CArla HOlbert
 
Posts: 3342
Joined: Wed Feb 21, 2007 11:35 pm

Post » Tue May 17, 2011 4:57 am

My first preference would be to use this 'TriggerHUDShudder', but I don't know how to apply it to the player.
I've read http://geck.gamesas.com/index.php/TriggerHUDShudder, but I don't understand. It has four optional parameters, but of what kind? Floats I assume. But.. how do I use it in the script?

I want to write something like:
scn CameraShakefloat shakingEffectset shakingEffect to player.TriggerHUDShudder float x1, float y1, float x2, float y2set shakingEffect to 2,4,3,2

But I know it's wrong!

If I knew how to use it properly I think this would solve my problem. Assuming it works, this would be a cleaner solution than the others, I think. Plus it can be controlled more than an explosion which is also preferable. Every time I edit an explosion (even something seemingly little!) it appears to break it. The shaking stops but other stuff still happens like the visual effects and sound.

Failing that, I'd prefer to script the camera movement myself. I keep searching, but I can't find out how to move the players viewpoint. I know it's possible... I just don't know how, that's what I wanna know :)
User avatar
Reanan-Marie Olsen
 
Posts: 3386
Joined: Thu Mar 01, 2007 6:12 am

Post » Tue May 17, 2011 8:10 am

Oh, I don't know if I've seen that function before. Going by the documentation that you linked to, you'd call it like this, using the values you've specified as an example:
TriggerHUDShader 2 4 3 2

Cipscis
User avatar
Mélida Brunet
 
Posts: 3440
Joined: Thu Mar 29, 2007 2:45 am

Post » Tue May 17, 2011 7:03 am

Oh, I don't know if I've seen that function before. Going by the documentation that you linked to, you'd call it like this, using the values you've specified as an example:
TriggerHUDShader 2 4 3 2

Cipscis


I've tried using it like that (and many other ways!). Would you mind posting a brief script to show me how you'd use it?

Do you mean like this:
scn CameraShakeTriggerHUDShader 2 4 3 2


Or more perhaps something like this:
scn CameraShakefloat shakingEffectset shakingEffect to TriggerHUDShaderset shakingEffect to 2 4 3 2


I've tried a lot of different things with it, but still no luck...
Hehe, I'm really lost ;)
User avatar
Neil
 
Posts: 3357
Joined: Sat Jul 14, 2007 5:08 am

Post » Tue May 17, 2011 7:20 am

No it would be something like this. This for example, would run it when the player entered the trigger this script is attached too.

scn MyExampleTriggerSCRIPTBegin OnTriggerEnter Player   TriggerHUDShudder 2 4 3 2End


You dont just have it alone, or just with scn. Put it in the run block of wherever it is needed.
User avatar
jason worrell
 
Posts: 3345
Joined: Sat May 19, 2007 12:26 am

Post » Tue May 17, 2011 6:25 am

No it would be something like this. This for example, would run it when the player entered the trigger this script is attached too.

scn MyExampleTriggerSCRIPTBegin OnTriggerEnter Player   TriggerHUDShudder 2 4 3 2End


You dont just have it alone, or just with scn. Put it in the run block of wherever it is needed.


Quite an old one this, just wondering if the poster or anyone else got around to resolving this as it's an effect I'm also looking to employ. I've tried what was suggested and it doesn't seem to do anything. Past experience says TriggerHUDshudder doesn't really work.
User avatar
saharen beauty
 
Posts: 3456
Joined: Wed Nov 22, 2006 12:54 am

Post » Tue May 17, 2011 10:01 am

What I need to know is how to move the player camera around. I have no idea what the player view is called... would it just be like player.camera? Also, how could I make it so the camera moves over a set period of time? If I just went 'player.camera setpos y +5' wouldn't it just move the camera there instantly? I want to make it move there over a period of time ;)

Again, thanks for the help. I might use that TriggerHitShader somewhere else now I've seen what it does.


If you don't mind diving into a script, you could check out how http://www.fallout3nexus.com/downloads/file.php?id=9396 guy does it. It is damn impressive. (Look for OTS camera)
User avatar
Emily Shackleton
 
Posts: 3535
Joined: Sun Feb 11, 2007 12:36 am

Post » Tue May 17, 2011 3:33 pm

If you don't mind diving into a script, you could check out how http://www.fallout3nexus.com/downloads/file.php?id=9396 guy does it. It is damn impressive. (Look for OTS camera)


This only works for the 3rd person View the 1st Person Camera does not have any GameSetting for offsetting its animated position.

Thank you all for your replies :) I tried it out, that's not the effect I was looking for. I can't believe my script worked first go without any trouble! Now I just need the right effect ;) I'll try and be clearer: I want the camera to move up and down, and maybe a little side to side, almost as though you were on a train or something. I'd prefer to script it myself rather than put invisible explosions everywhere. What I need to know is how to move the player camera around. I have no idea what the player view is called... would it just be like player.camera? Also, how could I make it so the camera moves over a set period of time? If I just went 'player.camera setpos y +5' wouldn't it just move the camera there instantly? I want to make it move there over a period of time ;)

Again, thanks for the help. I might use that TriggerHitShader somewhere else now I've seen what it does.


Only reliable way to do this is with SpecialIdles Beth included a few anim.kfs to this purpose as well so your easiest option is to just call PlayIdle AnimName and do whatever else you want to do.
User avatar
Emily Jones
 
Posts: 3425
Joined: Mon Jul 17, 2006 3:33 pm

Post » Tue May 17, 2011 12:03 pm

Typo, ignore :)
User avatar
Austin Suggs
 
Posts: 3358
Joined: Sun Oct 07, 2007 5:35 pm

Post » Tue May 17, 2011 1:36 pm

If you have Broken Steel look at the script on the activator of the subway in the Presidential Metro... you mentioned you wanted something like a metro starting and that is exactly what it is.
User avatar
Victor Oropeza
 
Posts: 3362
Joined: Sun Aug 12, 2007 4:23 pm


Return to Fallout 3