The key is to entice developers to even build "affordable" homes.  Developers are in the business of making money.  The reason they are willing to build multi-million dollar units is that it's a guaranteed huge payout.  Government can make all the rules it wants on purchasing and reselling, but if no one wants to build affordable units in the first place, no plan will work.