Thanks for posting your query.
The way you describe the problem in your daughter I suggest that you get your daughter examined by a doctor who shall run a battery of investigations. Episodes of fainting
with muscle spasms is suggestive of convulsions and need to be taken seriously to rule out some underlying condition. Usually heat does not precipitate such a condition but triggering factors need to be found out.
I hope I have addressed your concern. Please revert back if you would like to share more information.
Wishing your daughter all the best.