Quote:
Originally Posted by DeathChaos25
However, it says noscene, I'm guessing SceneProcessor won't be able to pick and interrupt these lines, any Idea of what I could do for them?
|
If it is a spoken line, it will also spawn a scene entity, which the plugin will pick up.
See my "No Lost Call" plugin (attached) for an example of stopping L4D2 Survivors keep calling out for help when they are the only one (everyone else have changed to a L4D1 character).
And just for short form:
PHP Code:
public OnSceneStageChanged(scene, SceneStages:stage)
{
switch (stage) {
case SceneStage_Started: {
new client = GetActorFromScene(scene)
if (client <= 0 || client > MaxClients || !IsClientInGame(client)) {
return
}
new initiator = GetSceneInitiator(scene)
if (initiator != SCENE_INITIATOR_WORLD) {
return
}
decl String:file[PLATFORM_MAX_PATH]
if (GetSceneFile(scene, file, sizeof(file)) == 0) {
return
}
if (StrContains(file, "lostcall", false) == -1) {
return
}
CancelScene(scene)
}
}
}
Also if I were you, when trying to find scenes, make a debug plugin that just prints all of the scenes out when created. On scene started, get scene file name and print it to chat. That way you will know if the scene processor can pick it up.