I'm working on a script that creates stormy weather but I have one issue. It makes only one loop and I don't know what is wrong.
#include "x2_inc_toollib"
void main()
{
location locLocation1 = GetLocation(GetWaypointByTag("WP_lightning1"));
location locLocation2 = GetLocation(GetWaypointByTag("WP_lightning2"));
location locLocation3 = GetLocation(GetWaypointByTag("WP_lightning3"));
location locLocation4 = GetLocation(GetWaypointByTag("WP_lightning4"));
location locLocation5 = GetLocation(GetWaypointByTag("WP_lightning5"));
location locLocation6 = GetLocation(GetWaypointByTag("WP_lightning6"));
location locLocation7 = GetLocation(GetWaypointByTag("WP_lightning7"));
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
int nLoop;
SetWeather (OBJECT_SELF, WEATHER_RAIN);
TLChangeAreaGroundTiles(GetArea(OBJECT_SELF), X2_TL_GROUNDTILE_WATER, 16, 16, 0.6);
for (nLoop = 1; nLoop<15; nLoop++)
{
DelayCommand(5.0, ApplyEffectAtLocation (DURATION_TYPE_TEMPORARY, eVis, locLocation1, 2.0));
DelayCommand(9.0, ApplyEffectAtLocation (DURATION_TYPE_TEMPORARY, eVis, locLocation2, 2.0));
DelayCommand(12.0, ApplyEffectAtLocation (DURATION_TYPE_TEMPORARY, eVis, locLocation3, 2.0));
DelayCommand(16.0, ApplyEffectAtLocation (DURATION_TYPE_TEMPORARY, eVis, locLocation4, 2.0));
DelayCommand(24.0, ApplyEffectAtLocation (DURATION_TYPE_TEMPORARY, eVis, locLocation5, 2.0));
DelayCommand(26.0, ApplyEffectAtLocation (DURATION_TYPE_TEMPORARY, eVis, locLocation6, 2.0));
DelayCommand(30.0, ApplyEffectAtLocation (DURATION_TYPE_TEMPORARY, eVis, locLocation7, 2.0));
nLoop = nLoop + 1;
}
}
At least someone could give me a better storm script.
'>
Modifié par Llionei, 26 juin 2011 - 08:57 .