Game Modding | Call of Duty: Black Ops 3 | Scripting
gunrock12:
I used this old tutorial i found somewhere and it suppose to have random snow intensity but it causes my map.gsc script error:
This is a follow up on the weather types, it will change the intensity of the weather.
Open your mapname.csc and add this in the main function.
level.weather_intensity = 0.3;
clientfield::register( "world", "weather_intensity", VERSION_SHIP, 2, "int", &weather_intensity, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
Replace the old while function where the fx got played with this.
while(1)
{
if(level.weather_intensity == 0)
{
wait .1;
continue;
}
PlayFX( localClientNum, SNOW_FX, self.origin );
wait level.weather_intensity;
}
Now add this function as well.
function weather_intensity( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
{
// If value = 0 that will stop the weather
// Lower the numbers to increase intensity ( Cannot go below 0 )
switch(newVal)
{
case 0:
level.weather_intensity = 0;
break;
case 1:
level.weather_intensity = 0.3;
break;
case 2:
level.weather_intensity = 0.15;
break;
case 3:
level.weather_intensity = 0.05;
break;
}
}
Now we move onto mapname.gsc, add this in the main function.
clientfield::register( "world", "weather_intensity", VERSION_SHIP, 2, "int" );
thread weather_intensity();
And add this function as well.
function weather_intensity()
{
weather_intensity = 1; // Starting weather type
while(1)
{
wait RandomIntRange(120, 360);
intensity = RandomInt(4); // Generates a number from 0 - 3
while(intensity == weather_intensity) // Don't want repeating intensity
{
intensity = RandomInt(4);
WAIT_SERVER_FRAME;
}
level clientfield::set("weather_intensity", intensity);
weather_intensity = intensity;
}
}
© 2017 ARDIVEE ALL RIGHTS RESERVED
here is my compile error:
UNRECOVERABLE ERROR:
SCRIPT ERROR: No generated data for 'scripts/mp/mp_eisen.csc'
ERR(6E) scripts/mp/mp_eisen.csc (17,0) : Compiler Internal Error : Uninitialized local variable 'version ship'
Linker will now terminate.
********************************************************************************
==================================================
What does "version ship" mean? this is the problem?
RaGe-74:
did you try taking it out or putting it in quotes ?
gunrock12:
did you try taking it out or putting it in quotes ?