News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 1st Apr 2012, 04:30 AM   #1
Gruntkiller4000
Registered User
 
Gruntkiller4000's Avatar
 
Join Date: Jul. 11th, 2011
Posts: 49
Reloading Tutorial

Is there any reloading/iron sights tutorial for UT-2004 because I want to add those features to my weapons. I looked at Ballistic Weapons but their code is too complicated. Any suggestions? Thanks.
Gruntkiller4000 is offline   Reply With Quote
Old 1st Apr 2012, 07:02 AM   #2
Wormbo
 
Wormbo's Avatar
 
Join Date: Jun. 4th, 2001
Location: Germany
Posts: 5,781
It's always complicated to a certain extent. You can try looking for tutorials, but the question is whether those will do what you had in mind.

Then again, what is iron sights? It's really just the weapon mesh's aiming direction aligned to the view direction.
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak/JDN | Unreal Wiki | Liandri Archives
Everything you ever wanted to know about replication| UnrealScript security considerations
<elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
<TNSe> nono
<TNSe> its always funny to find code a week later you dont even remember writing
<Pfhoenix> what's worse is when you have a Star Wars moment
<Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
Wormbo is offline   Reply With Quote
Old 4th Apr 2012, 03:40 AM   #3
Gruntkiller4000
Registered User
 
Gruntkiller4000's Avatar
 
Join Date: Jul. 11th, 2011
Posts: 49
Ok thank you I will look for some unreal script tutorials first then go to do some reloading.
Gruntkiller4000 is offline   Reply With Quote
Old 5th May 2012, 05:38 AM   #4
Gruntkiller4000
Registered User
 
Gruntkiller4000's Avatar
 
Join Date: Jul. 11th, 2011
Posts: 49
Hi I have performed basic reloading (I got it's magazine ammo to show on the HUD), and firing it takes off Mag Ammo not the normal ammunition. When it gets to 0 it takes it's value off the normal ammunition and resets it back to it's normal maximum mag. The problem is, I want a delay (when) it reaches 0, so it completes the animation and Then does the calculations after. I tried ways but there's No delay! I wanted a variable to increase by one using Level.TimeSeconds, but it's not increasing.

Is there some sort of event that allows that to happen? Thanks!
Gruntkiller4000 is offline   Reply With Quote
Old 11th Nov 2012, 04:17 PM   #5
Nathaniel3W
Registered User
 
Join Date: Nov. 11th, 2012
Posts: 44
I'm a total beginner in UDK, so take this as advice from someone who's figuring things out as he's going. If I had to program that, I would add a boolean to the firing function to check whether or not you're currently reloading, and make the function refuse to fire if reloading == True. Set the reloading boolean to True when you start reloading. I think you might be able to use SetTimer() to turn reloading back to False. Either that, or you might be able to add up the DeltaTime from tick to tick until enough time has passed. Change the ammo counter at the same time you re-enable shooting.
Nathaniel3W 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 03:36 AM.


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