News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 26th Oct 2001, 11:36 AM   #1
Kel-Boi
Registered User
 
Join Date: Oct. 26th, 2001
Posts: 4
Question Sniping mod: Questions

I must have posted this in the wrong forum the first time.

Greetings, folks.

I'm interested in making a mutator that causes a non-crouched player's view to wander/waver randomly. I've noticed that there is a "zooming" state, and I expect I can figure out whether there is a "crouched" state (must be, right? players move slower while crouched), and further whether there is a "zoomed" state, "walking" state, and "running" state. Any tips or hints would be great, since I'm new to the codebase.

(Optimally, a sniper's zoomed view would jostle most when running, less when walking, even less when standing still, and less still when crouched and moving, and least (possibly none) when crouched and still.)

I expect the major pain I'll suffer is figuring out how to make the player's view jostle. Any pointers to the right functions/variables would be fantastic. Once I know what to use I'm hoping it will be rather academic to come up with a "jostle" algorithm.

In any case, thanks for any help you folks can provide.
Cheers,
Kel
Kel-Boi is offline   Reply With Quote
Old 26th Oct 2001, 10:13 PM   #2
vlosk
Registered User
 
Join Date: Feb. 4th, 2001
Posts: 25
Sarcastic Arg

I don't have the example here on this comp, but e-mail me at: vlsok@powersurfr.com and i can pass you a nice simple little bit of 'jostle' material

Also, though state based should in theroy work fine, i think you would be better off making it works as follows:

High Jostle: The player is really moving. This can be falling, jumping, swimming, running, you name it; if it is based on the players speed you have full support for all physics.

Low Jostle: if the player is crouched.

Such would be done in the weapon's tick function, checking the values of the human owner (PlayerPawn(Owner).[something]) again, i don't have any examples here, but i have a bunch of example code bits at home, so e-mail me if you would like to know more.
vlosk is offline   Reply With Quote
Old 27th Oct 2001, 08:45 AM   #3
Kel-Boi
Registered User
 
Join Date: Oct. 26th, 2001
Posts: 4
Talking Awesome, thanks!

An email's on the way! =)
Kel-Boi is offline   Reply With Quote
Old 27th Oct 2001, 08:52 AM   #4
Captain Kewl
I know kewl.
 
Captain Kewl's Avatar
 
Join Date: Feb. 13th, 2001
Location: IN YOUR HOUSE
Posts: 794
bIsCrouching is in the PlayerPawn class. There's also a ShakeView function which is called when you fire a weapon or take damage.

function ShakeView( float shaketime, float RollMag, float vertmag)

Maybe have a timer that checks every second or so to see of bIsCrouching == False, and if it is, call ShakeView with shaketime of the timer interval and small RollMag and Vertmag. Make the values functions of magnitude of velocity or something.
Captain Kewl is offline   Reply With Quote
Old 27th Oct 2001, 10:27 AM   #5
Kel-Boi
Registered User
 
Join Date: Oct. 26th, 2001
Posts: 4
Awesome

Thanks for the tips, Cap Kewl!

I'm impressed and humbled by how helpful the folks on this message board are.

Give me a while, but once I have a working mutator I'll post the results here.

Thanks much!

Kel
Kel-Boi is offline   Reply With Quote
Old 27th Oct 2001, 02:56 PM   #6
vlosk
Registered User
 
Join Date: Feb. 4th, 2001
Posts: 25
heh

that plus the timer system was what my 'jostle' function was
vlosk is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:29 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer