Serious Sam Fusion 2017 (beta)

Serious Sam Fusion 2017 (beta)

[Gamemode/Resource Pack] T&C Co-Op
 This topic has been pinned, so it's probably important
Cyborg.SeriousSite  [developer] 29 Apr @ 2:54pm
Enemy Functions Guide
Hello. This is short guide about new T&C co-op feature which provides possibilities to change some enemy params or even control some attacks

How to use it
You have three ways to use functions
1. Wait any tick after spawn enemy with script or after enemy script initialization
2. Linear catch for single enemy
Example:
Wait(CustomEvent(LeggedCharacter001, "TCCoop_PuppetProperties_Initialized")) LeggedCharacter001:TakeAllWeapons()
3. Runhandled event which reacts on any existing enemy with script from start or newely spawned

Catch custom event: "TCCoop_PuppetProperties_Initialized" with payload:
3.1 GetPuppet() - Gets Enemy
3.2 GetClassTag() - Gets Class-Tag of Enemy

Example:
RunHandled( WaitForever, OnEvery(CustomEvent("TCCoop_PuppetProperties_Initialized")), function(eePropertiesInitialized) local entPuppet = eePropertiesInitialized:GetPuppet() if(eePropertiesInitialized:GetClassTag()=="ShadowPlayer_ShadowPlayer") then entPuppet:TakeAllWeapons() entPuppet:AwardWeapons({"DoubleShotgun", "SingleShotgun"}) entPuppet:SetAmmo("Shells", 2) entPuppet:EnableInfiniteAmmo(true) entPuppet:SetAlignment("Evil") elseif(eePropertiesInitialized:GetClassTag()=="HeadmanTCCoop_Aaaughikadze") then entPupet:SetDamageFuseMaxChance(0.5) elseif(eePropertiesInitialized:GetClassTag()=="Drone_DroneCarrier") then Wait(Delay(2)) entPupet:AttachPassenger(LeggedCharacter003, "Content/SeriousSamHD/TCCoopStuff/Enemies/Special/DroneCarrier/Tools/Zorg_Soldier_Passenger.ctl") end end)

List of Enemies and Functions
All Functions with Examples are here:
https://docs.google.com/document/d/1UWb6yph7k_YfaymEopklZmAGwsPV0gawrXlF5ow4uvU/edit?usp=sharing