In addition to previous mentioned good tips, I give you this one:
If you plan to make/have large-impact events ingame, make sure the players feel the effcts and have proper warning.
That is to say, wars increase prices and make people worried - also affects the rumour-mill in towns. Most likely, before the war, there have been news of worsening relations, rumours of troop movements, increased price in durable rations and weapons and so forth.
A mad wizard rising up from nowhere and summoning an army of skeletons will make the more estaclished orders active and intriqued - you could expect several paladins for example to be travelling to or visiting the area.
What I mean with this is: Notable events never happen without warning, and never without impact. Don't just spring large armies without warning on the town they are staying at, don't just make large groups of goblins or kobolds migrate nearby for a convenient dungeon and advertise it as such - rather have NPC spread stories of killed and stolen kattle, raided farmhouses and twitchy travelling merchants. ANd think of a basic good reason for why the army is sieging that town or the kobolds migrated nearby - nothing on that scale happens without an appropriate reason. Perhaps the town is of significant strategic importance, perhaps it houses the major weaponsmiths in the area, perhaps it is a local farm community and has plenty of food. Perhaps there are mountains nearby with convenient caverns and the local security is known to be lax and inefficient.
Plan some major motivations, for groups and characters, ahead of time. One or two is enough. So that when things go off the rails you can still portray are consistent, living world where people and groups have resources, objectives and goals - just like the players.
And if the player characters feel like they are without direction, have each player come up with two or three defining characteristics for their character (such as greedy, deceitful, dislikes lying, always haggling when purchasing or selling, suspicious of city-folk, dislikes dense forests, dislikes brainless brutes, has a hidden hatred of wizards etc), and a long-term goal as well as a short-term goal. Discuss these with them and set beforehand the conditions for reaching these goals - such as being accepted as a member to a wizards guild, being friends with city guard commander, recovering holy object X for his church, proving thievery and burglary as efficient ways of funding the party etc. Remember to reward players that use these characteristics in their play, or attempt to reach their goals - this makes play more fluid and can give you excellent situations to expand upon or even build entire side-campaings on. It also gives the players quantified steps both on short and long-term to focus on and measure their character improvement on.