Aller au contenu

Photo

Merging array in script ?


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
anakin5

anakin5
  • Members
  • 258 messages
Is there some operator defined on array in script ? I would like to merge 2 arrays of effects, can I use the + operator ?

effect[] arEffects;

arEffects = GetEffectsByAbilityId(oEnemy, ABILITY_SPELL_MASS_SLOW);
arEffects += GetEffectsByAbilityId(oEnemy, ABILITY_SPELL_SLOW);

Modifié par anakin5, 12 janvier 2010 - 10:23 .


#2
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
There is GetArraySize and you can keep adding things to the end of an array dynamically. So you could hand-merge them pretty easily.