• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] call MoveLightningEx

Status
Not open for further replies.
Level 19
Joined
Aug 16, 2007
Messages
881
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