• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] call MoveLightningEx

Status
Not open for further replies.
call MoveLightningEx (Solved)

Well, I can't get this to work... I've got two triggers, I won't show everything, only the important code.

JASS:
call MoveLightningEx(udg_A_LightningEffect[udg_A_Index[3]], true, udg_rloc1[udg_A_Index[3]], udg_rloc2[udg_A_Index[3]], 0, udg_rloc1[udg_A_Index[3]], udg_rloc2[udg_A_Index[3]], udg_A_Height[udg_A_Index[3]])

All variables are working and are correct, the only thing I want to happen, is that the Lightning Effect shall increase in height (Z), but this wont work. I've got this action before that custom scrips JASS action, but this action works correctly:
  • Set A_Height[A_Index[3]] = (A_Height[A_Index[3]] + (20.00 + PlayerSpeedBoost[(Player number of (Owner of A_Unit[A_Index[3]]))]))

This is how I create the lightning effect, maybe something is wrong here?

JASS:
Custom script:   call AddLightningEx("CLPB", true, udg_rloc1[udg_A_Index[1]], udg_rloc2[udg_A_Index[1]], 0, udg_rloc1[udg_A_Index[1]], udg_rloc2[udg_A_Index[1]], udg_A_Height[udg_A_Index[1]])
Custom script:       set udg_A_LightningEffect[udg_A_Index[1]] = GetLastCreatedLightningBJ()

Don't mind all those A_Index[x] variables, they are also working, but... Something must be wrong because the lightning effect won't increase in height... What is wrong with this?!


Edit:

I've find the thing that won't work, the trigger won't put the lightning effect as a variable. because, this won't work:

JASS:
Custom script:   call AddLightningEx("CLPB", true, udg_rloc1[udg_A_Index[1]], udg_rloc2[udg_A_Index[1]], 0, udg_rloc1[udg_A_Index[1]], udg_rloc2[udg_A_Index[1]], udg_A_Height[udg_A_Index[1]])
Custom script:       set udg_A_LightningEffect[udg_A_Index[1]] = GetLastCreatedLightningBJ()
Lightning - Destroy A_LightningEffect[A_Index[1]]

I solved this problem by my own, thanks anyway people! :)
 
Last edited:
Status
Not open for further replies.
Top