[nwscript]
#include "nw_i0_spells" // defines the GetRandomDelay function.
void main()
{
...
float fMaxDistance = 5.0; // max dist from waypoint where random loc will end up.
float fDistance = GetRandomDelay( 0.0, fMaxDistance ); // random distance from waypoint
vector vRandom = VectorNormalize( AngleToVector( GetRandomDelay( 0.0, 360.0 ))); // random dir from waypoint
vRandom *= fDistance;
vRandom += GetPosition( oSpawnPoint );
location myLocation = Location( oArea, vRandom, GetFacing( oSpawnPoint ));
...
}
[/nwscript]
Modifié par Axe_Murderer, 12 juillet 2011 - 06:35 .