Announcement

Collapse
No announcement yet.

Damage increase Power up

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Damage increase Power up

    Hi Peeps!

    Having a bit of a headache with figuring out how to set my power up thats going to increase the damage of projectiles here is the setup:

    I have 'experiment' tables that the player can interact with that give damage increases - now I need to be able to adjust the damage of my Projectile blueprint with the tables blueprint. I'm wondering the best way to go about this. The way I see it I have two options. I either find a legitimate way to actually increase the damage of the projectile or I half the health of the enemies (they are essentially 2 shot kills that will be instagibbed with the powerup!) Both seem to present the problem of actually referencing these variables in a different blueprint.

    I have the cast to object node hooked up, but I can't find a way to access the variables of that object from there.

    As always any help to my silly questions is mucho appreciato

    Cheers!

    SuperMassive20
    3D Environment Artist - stephenchapman.carbonmade.com

    #2
    if you create projectile BP interface allowing damage change from character that fires it, then after spawn actor node, cast back to projectile class and call the implemented function to set new damage.
    All the other receiving end would call to check what the damage is upon impact(hit/overlap event), the reason being:
    1. damage boost is per projectile, so when your projectile is in flight, and you happen to pickup powerup/or lose powerup on timeout, your projectile don't misteriously become more powerful or less powerful.
    2. you can do a lot of other interesting side effects this way, ie. stun/slow, on fire, etc.
    3. it can be done in independent event driven way so you don't have to poll all the projectiles or all actors could be affected all the time.
    Unreal Engine 4 Game Framework diagram for relation of all major base object types
    Unreal Engine 4 Input Event diagram, scroll down to section Input Processing Procedural
    Resident Evil Classic Camera
    RPCs official document, Must Read
    Everything you should know about replication

    Comment


      #3
      Originally posted by PenguinTD View Post
      if you create projectile BP interface allowing damage change from character that fires it, then after spawn actor node, cast back to projectile class and call the implemented function to set new damage.
      All the other receiving end would call to check what the damage is upon impact(hit/overlap event), the reason being:
      1. damage boost is per projectile, so when your projectile is in flight, and you happen to pickup powerup/or lose powerup on timeout, your projectile don't misteriously become more powerful or less powerful.
      2. you can do a lot of other interesting side effects this way, ie. stun/slow, on fire, etc.
      3. it can be done in independent event driven way so you don't have to poll all the projectiles or all actors could be affected all the time.
      Ok so in a blueprint form roughly how would that look? Completely new to this so its quite a lot to get my head around
      3D Environment Artist - stephenchapman.carbonmade.com

      Comment


        #4
        assuming you already have a projectile bp working with spawning.
        Your character bp would handle input(fire rocket) and state(power up or not)
        fireEvent->spawn projectile->cast to your projectileClass based on weapon equipped->check if character is powered up->call projectile's setDamage function(public or through interface) to set it's new damage.

        in project tile graph, you need to create/implement a public function called setDamage, which just set the damage of your projectile.

        other blueprint don't need to change because old graph should just work as is.
        Unreal Engine 4 Game Framework diagram for relation of all major base object types
        Unreal Engine 4 Input Event diagram, scroll down to section Input Processing Procedural
        Resident Evil Classic Camera
        RPCs official document, Must Read
        Everything you should know about replication

        Comment

        Working...
        X