- Joined
- Apr 19, 2011
- Messages
- 447
Hi.
Well, I'm making some tests with lightning management through custom scripts, as I'm planning to make my first serious spell, which graphic effect is almost entirely composed of lightning effects.
However, I don't know why the hell one of my triggers does not work, it gets disabled, says that there's a compile error, or something like that. Obviously, the issue is in the custom script, but as I'm still a noob with this kind of things, I can't found the problem.
The trigger that gets disabled is the "Loop" trigger. The used variables are as follow:
- L: Lightning variable.
- Loc01: Point variable.
- LZ: Real variable.
Here are the triggers:
This trigger creates the lightning at ground level.
This trigger should elevate the lightning to a Z height of 500.00.
As I said, these are just tests, so don't bother with leaks, or things like that, I'll make sure to remove them all when I make the true spell. Also, the loop trigger should get disabled when the lightning gets to 500.00 height, I know that too, but this is a test, so it doesn't matter. For now, I just need to know what's wrong with that trigger.
Maybe it's some stupid error, I don't know... Someone can help?
Thanks in advance.
Regards
Well, I'm making some tests with lightning management through custom scripts, as I'm planning to make my first serious spell, which graphic effect is almost entirely composed of lightning effects.
However, I don't know why the hell one of my triggers does not work, it gets disabled, says that there's a compile error, or something like that. Obviously, the issue is in the custom script, but as I'm still a noob with this kind of things, I can't found the problem.
The trigger that gets disabled is the "Loop" trigger. The used variables are as follow:
- L: Lightning variable.
- Loc01: Point variable.
- LZ: Real variable.
Here are the triggers:
This trigger creates the lightning at ground level.
-
Start
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Divinity Cage
-
Actions
- Set Loc01 = (Center of (Target))
- Custom script: set udg_L = AddLightningEx("HWPB", true, GetLocationX(udg_Loc01), GetLocationY(udg_Loc01), 0, GetLocationX(udg_Loc01), GetLocationY(udg_Loc01), 0)
-
Events
This trigger should elevate the lightning to a Z height of 500.00.
-
Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Custom script: call MoveLightningEx(udg_L, true, GetLocationX(Loc01), GetLocationY(Loc01), 0, GetLocationX(Loc01), GetLocationY(Loc01), udg_LZ)
- Set LZ = (LZ + 1.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LZ Higher than or equal to 500.00
-
Then - Actions
- Set LZ = 500.00
-
Other - Actions
- Set LZ = (LZ + 1.00)
-
If - Conditions
-
Events
As I said, these are just tests, so don't bother with leaks, or things like that, I'll make sure to remove them all when I make the true spell. Also, the loop trigger should get disabled when the lightning gets to 500.00 height, I know that too, but this is a test, so it doesn't matter. For now, I just need to know what's wrong with that trigger.
Maybe it's some stupid error, I don't know... Someone can help?
Thanks in advance.
Regards