Could "Wires" be a thing?

Post Reply
User avatar
FormulaFanboy
Posts: 61
Joined: Fri Jul 26, 2019 6:53 pm
Contact:

Could "Wires" be a thing?

Post by FormulaFanboy » Mon Aug 05, 2019 10:47 pm

I am making a scrolling platformer game where the player's Melee Weapon represents an electrical shock.
Would it be in any way possible to have a "Wire" object, where you could use the weapon in one side of the wire, and it would appear on the other side?
User avatar
chronicleroflegends
Posts: 190
Joined: Thu Sep 06, 2018 3:51 am

Re: Could "Wires" be a thing?

Post by chronicleroflegends » Sun Aug 11, 2019 1:30 am

I think this could be possible, if you were creative with scripting.

If I was needing a feature like that, I would create a custom enemy behavior script.
The enemy has 2 states: idle, shocked
If player hits enemy with weapon, don't lower health, instead set variable shock to true.
The enemies AI has it change to the shocked state if variable shock is true.
Enemy in shocked state automatically transitions back to idle after a delay set by the enemy timer.
Place 2 enemies, one at beginning of wire and one at end.

The effect that this would have on other things that contact the wire would require more specific programming with enemy collisions.
The reason you would need to use a variable is so that when you hit 1 enemy, the other enemy reacts as well.
~Do you believe in legends? ~
My Games: Nix: The Paradox Relic
Post Reply