No announcement yet.

Advice on creating Ikaragu polarity system?

  • Filter
  • Time
  • Show
Clear All
new posts

    Advice on creating Ikaragu polarity system?

    Hi! Currently working hard on a simple twin-stick shooter, now I need some advice. I want a shield that, when activated grants invulnerability against enemy A's attacks, while making the player vulnerable towards enemy B's attacks, but with 2x the effective damage when fighting enemy B. Eventually, this system will also build charge for absorbing enemy attacks to put towards a special move. What is your advice for how to approach such a system? The game is built off the base twin stick shooter template and made using blueprints.

    Thanks in advance for your guys help, you're the best! Any advice of any sort is welcome.

    Hi [MENTION=409232]manticore_[/MENTION] ,

    I would suggest breaking down your system into smaller features:

    -Create a shield that appears on the Player ship
    -Use a sphere collision to detect incoming projectiles -> If projectiles are coming from EnemyA (use a tag or the class name) then cast to the Player and call a custom event (EventHitByEnemyA). If they are coming from EnemyB then cast to Player and call custom event (EventHitByEnemyB).

    On your Player BP:

    EventHitByEnemyA -> Make player invulnerable for a set amount of time (use delay to toggle invulnerable to vulnerable)
    EventHitByEnemyB -> Add a damage multiplier to the hit

    This is barebones and it will depend on how you want to design the game. If you are using UE4's damage system then its easy to add a multiplier to the damage value. If you are using OnHit event, then use that to check the type of projectile that hit and go from there.

    Hope this puts you on the right track!
    [WIP] Procedural City Generator | RPG AI
    [MARKETPLACE] Animal Behavior Kit | Space Shooter Template | Procedural Foliage Tool | Procedural Park
    [FREE] Modular Road Tool | Action Platformer Template | Radar BP | Free Birds | Procedural Buildings
    Join our Discord