lets say I needed to make an event in my game that only happens on Halloween!
how would I make an if else event to do just that
i asked google but that didn’t help so I hope that you peeps can!
Use System.DateTime.Now - it will give you the local date.
if(System.DateTime.Now.Day == 31 && System.DateTime.Now.Month == 10)
{
//Have a cool event
}
You could make it more elegant creating a list of events with their respective dates and eventcode if you want more then just one event.
3 Likes
Omg thank you so much, this is exactly what I needed!