<aside> 📦 DTADD.acs

</aside>

<aside> ⚡ int AddSpawnFunc(int type, str name)

</aside>

Usage


Spawn functions are scripts that execute when specific actors spawn. Scripts can be made to execute on those actors as the activator. This function adds a script to be executed in that list of scripts.

Parameters

<aside> ⚠️ Note: If defining a spawn function for projectiles to be called on the client-side, you need to call this function in an OPEN CLIENTSIDE script.

</aside>

Return Value

Example


An excerpt from core’s scripts which show how to properly use SFT_PROJ and SFT_PROJCLIENT.

script "core_spawnfuncs" OPEN
{
    AddSpawnFunc(DTADD_SFT_PROJ, "core_projtransgive");
}

script "core_spawnfuncs_client" OPEN CLIENTSIDE
{
    AddSpawnFunc(DTADD_SFT_PROJCLIENT, "core_projtransgiveclient");
}

See Also


Hook Functions