279 {
282
283 #ifdef DIAG_DEVELOPER
285 {
286 for(int i = 0; i < gatheredSurfaces.Count(); i++)
287 {
288 Print(gatheredSurfaces.GetKey(i));
289 Print(gatheredSurfaces.Get(gatheredSurfaces.GetKey(i)));
290
291 }
292 Print(
"--------------------------------------------------------------------");
293 }
294 #endif
295
299 {
300 if (spookyEvent.CanPerform(
m_Player, currentTime, gatheredSurfaces))
301 validEvents.Insert(spookyEvent);
302 }
303
304
306
307 if (validEvents.Count() > 0)
308 {
310 selectedEvent = validEvents[randIndex];
311 }
312 if (selectedEvent)
313 {
315 return true;
316 }
317 return false;
318
319 }
void GatherSurfaces(notnull TStringVectorMap gatheredGurfaces)
class SpookyEventBase m_SoundEvents
proto int GetTime()
returns mission time in milliseconds
void Perform(PlayerBase player, float currentTime, TStringVectorMap gatheredSurfaces)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
map< string, vector > TStringVectorMap
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].