Complex sentence: However, he became friends with writer-director Kevin Smith during filming, and Smith wrote the lead role in his romantic comedy "Chasing Amy" (1997) for Affleck.
Split into simpler sentences: However, he became friends with director Kevin Smith during filming. Smith then wrote "Chasing Amy" (1997) for Affleck.