How to sell membership on event page and apply the membership discount? (Autodiscount)
The Event Membership Signup extension is designed for this purpose--to give a discounted price for the membership/event combo--but it won't help in certain complex scenarios. 

If your event fee is $100, and your membership fee is $50, and you want to give a $20 combo discount, there are two ways to do it. You could add a new price field with a single checkbox option for $30 membership, or you could add a new option to your existing event price field offering a registration and membership together for $130.

On the other hand, you cannot (without custom code) say that selecting the membership option gives 20% off on each of a bunch of possible add-on items.  The discount comes from the price you assign to the option that gives you the membership, so the discount can't be variable.