

--appelé lors de la création de cutscene

--todo comment ca fonctionne maintenant ???
function OnTimelineCreateEvent(cut,track,event)
	OPLog.Log("track event "..track.." "..event)
	--on remplit les champs Event et Unit automatiquement
	--local name = cut.GetEventParam(track,event,"Name")
	--OPLog.Log("name "..name)
	--param = "CS"..string.gsub(event,"%p","")
	param = "CS"..event
	OPLog.Log("param "..param.." "..event)
	cut.SetEventParam(track,event,"Event",param)
		
	if (event == "PlaySound()" or event == "PlayRandomSound()") then
		--OPLog.Log("wait ")
		cut.SetEventParam(track,event,"Wait","WaitCSPlaySound()")
	end
	
	cut.SetEventParam(track,event,"Unit",OPUnitFactory.GetUnit("CutscenePlayer","Unit"))
		
end
