I'm with most people here - Z270 makes way more sense as it'll allow you to get a much cheaper motherboard. If you have a set budget then definitely go 7700k, you'll end up paying quite a bit less for your CPU/mobo combo & those two CPUs will be identical in games, plus you'll get no real benefit from having spent way more on the X299 motherboard. You'll be much better off getting a 7700k, a sensible price motherboard, & the best possible GPU. If you spend the same budget on X299 you'll be stepping down on your GPU & you'll have a worse gaming experience overall.
All that said, if money isn't much of a problem then obviously X299 has an upgrade path whereas the Z270 doesn't really so X299 is the better choice in that situation, but then don't get the 7740x, get something with more cores so it'll last a bit longer.
My advice would be something like the build Herc08 posted above. If you specify a budget people will throw pcpartpicker builds at you until you get one you like
we love a budget challenge! I'd probably go with a Ryzen 1700 & clock it to 3.8-4.0 personally though, but depends what games you're playing because whilst that'll perform similar enough in most games, there's the odd (usually older) game that's very Intel friendly.