[Unit Arrays]: Custom Abilities, and specific setup

Dregonx

TH.net Regular
Reaction score
21
====This is to help understand about the type of map====

Alright, in my map, first you select a hero at the beginning, you level the hero up and upgrade your abilities like any other hero would, and these abilities are all entirely custom made by me, custom effects, damage, the works. Up to 4 players can select a hero, and you can even be the same one as someone else.

Each ability sets the caster unit to a specified unit array, and each caster unit has it's own set number, so the first selectable character for being the caster he will be 1, then the second selectable character would be 2, etc. The targets however, have a complete different number unit array. So for ability 1 character 1 it would be unit target[1], for ability 2 character 1, it would be unit target[2], and then for say character 2, ability 1, it would be unit target[5]

====This is the actual problem====

They all have specified numbers, not based on the player or anything, meaning if 2 players were to select the same character, and use the same ability, the ability would get really glitchy, and start casting in random areas between the 2 characters, because they are sharing the same caster unit variable, now sure I could change it where each character ability has a different caster number just like the targets, but it wouldn't change anything if two characters casted the same thing again.

====How I need this solved====

I need it where it's set up based on what player you are, so if player 2, and 3 are the same character, they would have their own individual unit arrays, so abilities could not bug out and do random things between the two.

Thanks in advanced, sorry for the wall of text. :rolleyes:

-Dregonx
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top