Home Unreal Engine

Which part of my custom code edits the weapon range?

Hey guys....

...quick question....

Which part of my custom code edits the weapon range?

As you can see in the image below, I am able to use my fire extinguisher to 'hit' a target from about 90ft, and probably more if i were able to get further back!!

The image after that shows my custom weapon code (for projectile). Ive tried to play with a few numbers, but it doesnt seem to do anything.

Can anyone give me some ideas?

Much Appreciated! :)

jonm4y

error4b.jpg

error4d.jpg




*Ive blurred out a lot of the graphical stuff in the main image as it was irrelevant to my question :)

Replies

  • Butthair
    Offline / Send Message
    Butthair polycounter lvl 11
    Looks like you can play with Speed and MaxSpeed, they would control how fast it moves, therefore influences how far it would go before dying (I assume the projectile dies after a second).

    You also should check the root of this script you are extending. Look at UTProjectile, and see what it extends from and so on. Either that or go to the Unreal Wiki page and search for the terms of your script (Like MaxSpeed, and more curiously MaxEffectDistance). It should give some form of explanation, hopefully shedding like on what these parameters are meant for.
  • Parkar
    Offline / Send Message
    Parkar polycounter lvl 18
    The object will die after 2 seconds (lifespan property) so either do as Butthair suggests, tweak the speed or lower the lifespan if the speed is right but you just want to lower the range.

    Edit: Just realized that you probably want to lessen the range not increase it.
  • JValencia
    Offline / Send Message
    JValencia polycounter lvl 10
    You should also adjust the TerminalVelocity float var, which I think is found in the UDKProjectile class. This will affect the drop-off trajectory the projectile will take, which greatly affects the range.

    Note: TerminalVelocity will only affect the Projectile if its physics are set to PHYS_Falling.
Sign In or Register to comment.