- Joined
- Jan 30, 2013
- Messages
- 12,758
So, I manage to create this spell based on my previous work yet it fails on the first cast. Any subsequent cast works properly as it should. The code uses a combination of Dynamic Indexing and Unit Indexer since the old base uses Unit Indexer and I don't wanna to recode that portion from scratch. This is developed using 1.31 patch, so either that or Reforged to open the test map.
I can confirm the issue is related to the arrays not being initialized on first cast (it is initialized on second cast) after some small debugging (the array values are either 0 or null, which is not suppose to be the case).
EDIT:
Tried adding this at end of config (run at map init) and doesn't work:
Seems to be not array related, but this specific function being weird:
EDIT:
Figured it out. Damn, I switched variables between Index and non-index caster and screw myself over.
I can confirm the issue is related to the arrays not being initialized on first cast (it is initialized on second cast) after some small debugging (the array values are either 0 or null, which is not suppose to be the case).
EDIT:
Tried adding this at end of config (run at map init) and doesn't work:
-
-------- First Cast Initializer --------
-
Set PsyDom_IndexMax = (PsyDom_IndexMax + 1)
-
Set PsyDom_IndexCaster[PsyDom_IndexMax] = No unit
-
Set PsyDom_IndexLevel[PsyDom_IndexMax] = 0
-
Set PsyDom_IndexPoint[PsyDom_IndexMax] = (Center of (Playable map area))
-
Set PsyDom_IndexActivationDelay[PsyDom_IndexMax] = 0.00
-
Set PsyDom_InActivationSpcEffect[PsyDom_IndexMax] = (Last created special effect)
-
Set PsyDom_IndexMax = (PsyDom_IndexMax - 1)
Seems to be not array related, but this specific function being weird:
-
Set PsyDom_IndexLevel[PsyDom_IndexMax] = (Level of PsyDom_Ability for PsyDom_Caster)
EDIT:
Figured it out. Damn, I switched variables between Index and non-index caster and screw myself over.
Last edited: