![]() |
|
|
#1 |
|
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.
|
|
|
|
|
|
|
#2 |
|
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 | 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!" |
|
|
|
|
|
|
#3 |
|
Ok thank you I will look for some unreal script tutorials first then go to do some reloading.
|
|
|
|
|
|
|
#4 |
|
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! |
|
|
|
|
|
|
#5 |
|
Registered User
Join Date: Nov. 11th, 2012
Posts: 39
|
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.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|