Rainy Day

Scripting particularly to improve NoX is discussed in here

Rainy Day

Postby panic » Fri Nov 17, 2017 8:59 am

Video: https://youtu.be/5kxh_Rt2hv0

Code: Select all
void MapInitialize()
{
   FrameTimerWithArg(10, 22 | (17 << 8), SpawnRainy);
   FrameTimerWithArg(10, 23 | (18 << 8), SpawnRainy);
   FrameTimerWithArg(10, 25 | (24 << 8), SpawnRainy);
}

void SpawnRainy(int num)
{
   int wp = num & 0xff;
   int area = (num >> 8) & 0xff;
   int unit = CreateObject("WeirdlingBeast", area);

   LookWithAngle(unit, area);
   CreateObject("BlackPowder", area);
   SetCallback(unit, 9, dropRain);
   Damage(unit, 0, CurrentHealth(unit) + 1, -1);
}

void dropRain()
{
   int wp = GetDirection(self);
   int rain;
   
   if (IsCaller(GetTrigger() + 1))
   {
      RhombusPut(1, GetWaypointX(wp), GetWaypointX(wp) + 400.0, GetWaypointY(wp) - 400.0, GetWaypointY(wp));
      rain = CreateObject("CorpseRightUpperArmE", 1);
      Raise(rain, 280.0);
      DeleteObjectTimer(rain, 27);
      MoveObject(self, GetObjectX(self), GetObjectY(self));
   }
}

void RhombusPut(int wp, float x_low, float x_high, float y_low, float y_high)
{
    float rnd_x = RandomFloat(y_low, y_high);
   float rnd_y = RandomFloat(0.0, x_high - x_low);
    MoveWaypoint(wp, x_high - y_high + rnd_x - rnd_y, rnd_x + rnd_y);
}
panic
Adept
Posts: 263
Joined: Thu Nov 12, 2015 3:47 pm

Re: Rainy Day

Postby superjack46 » Fri Nov 17, 2017 4:02 pm

That's fucking awesome. Map scripting only?

Jung Yul also made a rain map, differently, and on estate.
Attachments
storm.zip
(95.68 KiB) Downloaded 5 times
WOL account: unknownle, character: Maurice Ravel, my NoX related website: http://corner.noxcommunity.com
User avatar
superjack46
Administrateur supérieur
Administrateur supérieur
Posts: 117
Joined: Fri Apr 04, 2014 2:52 pm

Re: Rainy Day

Postby panic » Sat Nov 18, 2017 3:09 am

yeah, it is only script.

nox script 3.0 is very powerful.

thank you zoa
panic
Adept
Posts: 263
Joined: Thu Nov 12, 2015 3:47 pm


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest