Blog Archive

Con la tecnología de Blogger.

amnesia scripts


aqui encontraran todos los scripts para amnesia



HPS FILES

///////// ////////////////////////////


void OnStart()
{

}

void OnLeave()

{

}



void OnEnter()

{

}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


AQUI UNA SERIE DE SCRIPTS FUNDAMENTALES PARA LA CREACION DE CUSTOMS.
   ESTOS SCRIPTS TE DAN LA POSIBILIDAD DE, POR JEMPLO: HACER QUE AL TOCAR UN AREA  SE ACTIVE  UN ENEMIGO.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Prim. Ej: 

void OnStart()
{
            AddEntityCollideCallback("Player", "areaenemigo", "enemigo", true, 1);
}
void OnLeave()
{
}
 
void OnEnter()
{
}

AddEntityCollideCallback Te da la posibilidad de interactuar con un area la cual activaria una accion.

Como lo vemos en esta imagen...

en esta imagen lo que hacemos es colocar un AddEntityCollideCallback el cual activa una accion en este caso llamada "enemigo" lo cual activa al enemigo llamado "enemigo"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Aqui Todos  Los scripts que usamos en la creacion de "Custom Stories" :)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


HPS FILES
/////////
void OnStart()
{
}
void OnLeave()
{
}

void OnEnter()
{
}

////////////////////////////////
Scripts efecto dormir
//////////////////////

SetPlayerActive(false);
FadeOut(0);
FadePlayerRollTo(65, 20, 20);
MovePlayerHeadPos(-1, -0.45, -0.95, 20, 1);
AddTimer("Activate_Player", 3, "FadeIn");
FadeImageTrailTo(3, 2);

}

void FadeIn(string &in timer_name)
{
FadeIn(2);
AddTimer("", 2, "WakeUp");
}
void WakeUp(string &in timer_name)
{
AddTimer("", 1, "Up");
}

void Up(string &in timer_name)
{
FadeImageTrailTo(0, 1);
MovePlayerHeadPos(0, 0, 0, 2, 2);
FadePlayerRollTo(0, 1.7, 500);
AddTimer("", 2, "levantarse");
}
void levantarse(string &in timer_name)
{
MovePlayerHeadPos(0, 0, 0, 2, 2);
SetPlayerActive(true);
}


/////////////////////////////////////
Como Hacer Que el Enemigo Te Siga
///////////////////////////////////

ShowEnemyPlayerPosition("nombre enmigo");



////////////////////////////////
Como Usar Una Palanca Muy bueno//
////////////////////////////////

AddEntityCollideCallback("nombre palanca interact", "nombre area des palanca", "nombre accion 1", true, 1);
AddUseItemCallback("", "nombre palanca item", "nombre objeto a romper", "nombre accion 2", true);
}



void nombre accion 1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("nombre palanca rota", true);
SetEntityActive("nombre palanca interact", false);
GiveSanityBoost();
SetSwingDoorLocked("nombre objeto a romper", false, true);
CreateParticleSystemAtEntity("p1", "ps_dust_impact_vert.ps", "nombre area particula", true);
PlayMusic("break_wood_metal1.ogg",false, 10, 0, 1, false);
}


void nombre accion 2(string &in asItem, string &in asEntity)
{
SetEntityActive("nombre palanca interact", true);
GiveSanityBoost();
RemoveItem("nombre palanca item");
}



NOTAS
////////

<CATEGORY Name="Journal">
<Entry Name="Note_NOMBRE NOTA_Name">TITULO</Entry>
<Entry Name="Note_NOTETEXT_Text">TEXTO NOTA</Entry>


////////////
Diarios
/////////



<CATEGORY Name="Journal">
<Entry Name="Diary_nombre diario_Name1">nombre diario</Entry>
<Entry Name="Diary_nombre diario_Text1">descripcion</Entry>




Llaves
///////
AddUseItemCallback("", "nombre llave", "nombre puerta", "nombre accion", true);
}

void nombre accion(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("nombre puerta", false, true);
PlaySoundAtEntity("", "Unlock_Door", "nombre puerta", 0, false);
RemoveItem("nombre llave");
}


LLAVES DESCRIPCION
/////////////////////


<CATEGORY Name="Inventory">
<Entry Name="ItemName_nombre llave">TITULO LLAVE</Entry>
<Entry Name="ItemDesc_nombre llave">DESC LLAVE</Entry>
</CATEGORY>

Como activar enemigos con "items"
//////////////////////////////

"void onStart"

SetEntityPlayerInteractCallback("nombre item", "nombre accion", true);



void onLeave


void nombre accion(string &in asEntity)
{
SetEntityActive("nombre enemigo", true);
GiveSanityDamage(12.0f, true);
PlaySoundAtEntity("", "nombre sonido", "Player", 0, false);
AddEnemyPatrolNode("nombre enemigo", "nombre pathnode", 0, "idle");
AddEnemyPatrolNode("nombre enemigo", "nombre pathnode2", 0, "idle");
}



Como activar enemigos con "areas"


AddEntityCollideCallback("Player", "nombre area", "nombre accion", true, 1);
}
void nombre accion(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("nombre enemigo", true);
PlaySoundAtEntity("", "nombre sonido", "Player", 0, false);
GiveSanityDamage(10.0f, true);
}





////////////////////////
musica

void OnStart
///////////////




AddEntityCollideCallback("Player", "nombre area", "nombre accion", true, 1);
 

void nombre accion(string &in asParent, string &in asChild, int alState)
{
PlayMusic("nombre musica", false, 1, 0.0f, 1, false);
}






Areas "Sign"
///////////



extra_english:

<CATEGORY Name="Sign">
<Entry Name="text_Entry">texto</Entry>
</CATEGORY>







Sonidos
///////


PlaySoundAtEntity("", "nombre sonido .snt", "Player", 0, false);





////////////////////////
checkpoints
////////////////////////

AddEntityCollideCallback("Player", "nombre area", "nombre accion", true, 1);
}

void nombre accion(string &in asParent, string &in asChild, int alState)
{
CheckPoint("nombre area","PlayerStartArea_num", "nombre_Accion", "textCategory", "TextEntry");
}







///////////
DeathHints//
//////////


<CATEGORY Name="TextCategory">
<Entry Name="TextEntry">texto</Entry>





////////////////////
propulsador
///////////////////

AddEntityCollideCallback("Player", "area", "nombre accion", true, 1);

void NOMBRE ACCION(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("nombre objeto", true);
AddPropImpulse("nombre objeto", 0, 0, 0, "world");
}



////////////////////////
cambiar de mapas con areas
////////////////////////

AddEntityCollideCallback("Player", "nombre area", "nombre accion", true, 1);
}

void nombre accion(string &in asParent, string &in asChild, int alState)
{
ChangeMap("nombre mapa", "PlayerStartArea_num", "", "");
}








///////////////////////////
como crear particulas en areas
////////////////////////



CreateParticleSystemAtEntity("", "nombre particula", "nombre area", false);

//////////////////////////
destruir particulas
////////////////////////

DestroyParticleSystem("nombre particula");






/////////
CREDITOS
///////



StartCredits("nombre musica", false, "TextCat", "TextEntry", 10);





//////////////////////////////////////
scripts para abrir puerta rara?
/////////////////////////

SetEntityPlayerInteractCallback("nombre objeto", "nombre accion ", true);
}
void nombre accion(string &in asEntity)
{
SetEntityActive("nombre pri_puerta", true);
SetEntityActive("nombre seg_puerta", false);
PlaySoundAtEntity("", "nombre sonido", "nombre puerta", 2, true);
}




//////////////////////////////////////////
como activar particulas, focos o lamparas y sonidos
///////////////////////////////////////////


SetLampLit("nombre foco o lampara", true, true);

CreateParticleSystemAtEntity("", "nombre particulas", "nombre area", true);

PlaySoundAtEntity("", "nombre sonido", "1", 1, false);



////////////
Temblor
///////////




StartScreenShake(intensidad, tiempo del temblor, tiempo en llegar a la mayor intensidad del temblor , tiempo en terminar el temblor);

///////////////////////////////////////

PD: "intensidad" si quieren un buen efecto del temblor
no superar el valor de uno recomendable "0.15" "0.30" o "0.25" hacia abajo


/////////////
rotar objetos
////////////


RotatePropToSpeed("nombre objeto", 1, 0.50, 0.50, 0.50, 0.50, false, "");

PD: solo "StaticObjects"

//////////////////////////////////////////////


/////////////////////////
crear "FOG AREAS"
///////////////////////

esto sirve para crear un "FogArea" en todo el mapa.

"SetFogActive(true);"

este es para darle color al "FogArea"

" SetFogColor( 0, 0, 0, 0);"

PD: primer "0" es rojo

PD: segundo "0" es verde

PD: tercer "0" es azul

PD: cuarto "0" es el "alpha" o la intensidad del FogArea

///////////////////////////////////////////


//////////////////////////////
como hacerle daño al jugador
/////////////////////////

GivePlayerDamage(80.0f, "BloodSplat", false, true);




///////////////////
abrir puerta sin tocarla
//////////////////////

SetSwingDoorDisableAutoClose("nombre puerta", true);
SetSwingDoorClosed("nombre puerta", false, false);


AddPropImpulse("nombre puerta", 0, 0, 1.80, "world");

PD: en el video vean que puse el AddPropImpulse
en un timer no junto con el

SetSwingDoorDisableAutoClose
SetSwingDoorClosed

ok :)

///////////////////////////////
para las callback func de algun item
///////////////////////////////

void callbackFunc (string &in asEntity, string &in type)

{

}

///////////////////
para mover los objetos/
/////////////////////


SetMoveObjectState("secret_door", 1);

/////////////////////////////////////////////////////////////////
amnesia level editor parte 7
///////////////////////////////////////////////////////////////
 

AddEntityCollideCallback("Player", "nombre area", "nombre accion", true, 1);
}


void nombre accion(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "screamer.snt", "Player", 0, false);
SetEntityActive("nombre_cuerpo_volador", true);
AddPropImpulse("nombre_cuerpo_volador", 0, 0, -20, "world");
GiveSanityDamage(1000.0f, true);
AddTimer("Timer", 3, "nombre mapa");
}



void nombre mapa(string &in atTimer)
{
ChangeMap("nombre mapa", "PlayerStartArea_num", "", "");
}



//////////////////////////////////////////////////////////////////////////////
amnesia level editor parte 8
/////////////////////////////////////////////////////////////////////////////


void OnStart()
{
AddEntityCollideCallback("Player", "nombre_area_derrumbe", "nombre accion_derrumbe", true, 1);
AddEntityCollideCallback("Player", "nombre area_enemigo", "nombre accion_enemigo", true, 1);
AddEntityCollideCallback("Player", "nombre area_sonidos", "nombre accion_sonidos", true, 1);
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
}



void nombre accion sonidos(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false);
}



void nombre accion enemigo(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("nombre enemigo", true);
GiveSanityDamage(10.0f, true);
AddEnemyPatrolNode("nombre enemigo", "PathNodeArea_num", 0, "idle");
}


void nombre accion_derrumbe(string &in asParent, string &in asChild, int alState)
{
FadeOut(0);
FadeIn(50);
GiveSanityDamage(1000.0f, true);
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
AddTimer("Timer", 3, "nombre accion_timer");
}


void nombre accion_timer(string &in atTimer)
{
ChangeMap("nombre mapa_derrumbe", "PlayerStartArea_num", "", "");
}



void OnLeave()

{

}


void OnEnter()

{

}

////////////////////////////////////////////////////////////////////////////////////////////////////////
amnesia level editor parte 17
/////////////////////////////////////////////////////////////////////////////////////////////////

void OnStart()
{
AddUseItemCallback("", "nombre objeto a injectarse", "nombre cuerpo", "nombre accion", true);
SetEntityPlayerInteractCallback("nombre jeringa injectada", "nombre accion", true);
}

void nombre accion AddUseItem(string &in asItem, string &in asEntity)
{
StartEffectFlash(00001.0f, 2.0f, 1.0f);
SetEntityActive("nombre jeringa injectada", true);
PlayMusic("slime_create5.ogg", false, 6.0f, 0.0f, 0, false);
RemoveItem("nombre prim jeringa");
}


void nombre accion SetEntityPlayer(string &in asEntity)
{
AddTimer("", tiempo, "nombre accion");
StartEffectFlash(00001.0f, 2.0f, 4.0f);
RemoveItem("nombre jeringa injectada");
PlayMusic("slime_create5.ogg", false, 6.0f, 0.0f, 0, false);
}

void nombre accion prim_Timer(string &in asTimer)
{
AddTimer("", tiempo, "nombre accion");
}

void nombre accion seg_Timer(string &in asTimer)
{
PlayMusic("21_meat_snap02.ogg", false, 6.0f, 0.0f, 0, false);
AddTimer("", tiempo, "nombre accion");
FadeImageTrailTo(10.0f, 10.0f);
}

void nombre accion tercer_Timer(string &in asTimer)
{
PlayMusic("21_intro_scream.ogg", false, 6.0f, 0.0f, 0, false);
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////
Efecto Statua: parte 19
/////////////////////////////////////////////////////////

efecto de estatua
AddEntityCollideCallback("Player", "area efecto estatua", "efecto estatua", true, 1);
void efecto estatua(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 1, "timer_1");
StartEffectFlash(00001.0f, 2.0f, 1.0f);
SetPlayerActive(false);
}

void timer_1(string &in asTimer)
{
SetEntityActive("st1", true);
AddTimer("", 3, "timer_2");
StartEffectFlash(00001.0f, 2.0f, 1.0f);
}
void timer_2(string &in asTimer)
{
SetEntityActive("st2", true);
SetEntityActive("st3", true);

SetEntityActive("st1", false);
AddTimer("", 3, "timer_3");
StartEffectFlash(00001.0f, 2.0f, 1.0f);
}
void timer_3(string &in asTimer)
{
SetEntityActive("st4", true);
SetEntityActive("st5", true);
SetEntityActive("st6", true);

SetEntityActive("st2", false);
SetEntityActive("st3", false);
AddTimer("", 3, "timer_4");
StartEffectFlash(00001.0f, 2.0f, 1.0f);
}
void timer_4(string &in asTimer)
{
SetEntityActive("st7", true);
SetEntityActive("st8", true);
SetEntityActive("st9", true);
SetEntityActive("st10", true);

SetEntityActive("st4", false);
SetEntityActive("st5", false);
SetEntityActive("st6", false);
SetPlayerHealth(20);
AddTimer("", 0.4, "changemap");
GiveSanityDamage(1000, true);
SetPlayerActive(true);
}
las "st1'st2'st3 etc en los scripts son las estatuas o armaduras "


////////////////////////////////////////////////////////////////////////////////////////////////////////////
amnesia level editor pare 21
/////////////////////////////////////////////////////////


esto es todo lo que hice en la parte 21 de mi guia
//////////////////////////////////////////////////////////////////

AddEntityCollideCallback("Player", "nombre area", "nombre accion", true, 1);
SetLightVisible("nombre spothLight", false);
SetLightVisible("nombre spothLight2", false);
}

void nombre accion AddEntity(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisableTriggers("nombre enemigo", true);
SetLightVisible("nombre spothLight2", true);
SetEntityActive("nombre enemigo", true);
StartPlayerLookAt("nombre enemigo", 2, 3
"nombre enemigo");
SetPlayerActive(false);
AddTimer("", 3, "nombre accion Timer1");
}

void nombre accion Timer1(string &in asTimer)
{
SetEntityActive("nombre enemigo2", true);
SetEntityActive("nombre enemigo", false);
GiveSanityDamage(1000, false);
SetLightVisible("nombre spothLight", true);
SetLightVisible("nombre spothLight2", false);
StopPlayerLookAt();
AddTimer("", 1, "nombre accion timer2");
SetPlayerActive(true);
}

void nombre accion timer2(string &in asTimer) {
SetEntityActive("nombre enemigo2", false); SetLightVisible("nombre spothlight", false);
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////
amnesia level editor pare 22
/////////////////////////////////////////////////////////


AddEntityCollideCallback("Player", "nombre prim. area", "nombre accion1", true, 1);
AddEntityCollideCallback("Player", "nombre seg. area", "nombre accion 2", true, 1);
AddEntityCollideCallback("nombre cotito", "nombre area de la puerta3", "nombre accion 3", true, 1);


}

////////////////////////////////////////////////
///////////////////////////////////////////////
void nombre accion1(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("nombre puerta1", 10.0f);
StartPlayerLookAt("nombre puerta1", 10, 11, "nombre puert1");
GiveSanityDamage(40.0f, true);
SetPlayerActive(false);
AddTimer("", 1, "nombre timer accion1");
PlaySoundAtEntity("", "react_breath", "Player", 0, false);
}
void nombre timer accion1(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}



void nombre accion 2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("nombre cotito", true);
AddPropImpulse("nombre cotito", 0, 0, 0, "world");
}

void nombre accion3(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("nombre puerta coto", 0.0f);
GiveSanityDamage(40.0f, true);
PlaySoundAtEntity("", "react_breath", "Player", 0, false);
}

//////////////////////////////////
bueno amigo perdon si esta todo desordenado pero en el video muestro todo asi que ahi van ordenando todo, ya sabran porque no lo ordene yo. :)


void cotito1(string &in asEntity)
{
SetEntityActive("coto1", true);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(30.0f, true);
AddTimer("", 0.6, "look");
SetPlayerActive(false);
}
void look(string &in asTimer)
{
StartPlayerLookAt("l1", 5, 5, "");
AddTimer("", 0.6, "look2");
SetLampLit("l1", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}

void look2(string &in asTimer)
{
StartPlayerLookAt("l2", 5, 5, "");
AddTimer("", 0.6, "look3");
SetLampLit("l2", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}

void look3(string &in asTimer)
{
StartPlayerLookAt("l3", 5, 5, "");
AddTimer("", 0.6, "look4");
SetLampLit("l3", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}

void look4(string &in asTimer)
{
StartPlayerLookAt("l4", 5, 5, "");
AddTimer("", 0.6, "look5");
SetLampLit("l4", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}
void look5(string &in asTimer)
{
StartPlayerLookAt("l5", 5, 5, "");
AddTimer("", 0.6, "look6");
SetLampLit("l5", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}
void look6(string &in asTimer)
{
StartPlayerLookAt("l6", 5, 5, "");
AddTimer("", 0.6, "look7");
SetLampLit("l6", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}
void look7(string &in asTimer)
{
StartPlayerLookAt("l7", 5, 5, "");
AddTimer("", 0.6, "look8");
SetLampLit("l7", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}
void look8(string &in asTimer)
{
StartPlayerLookAt("l8", 5, 5, "");
AddTimer("", 0.6, "look9");
SetLampLit("l8", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}
void look9(string &in asTimer)
{
StartPlayerLookAt("l9", 5, 5, "");
AddTimer("", 0.6, "look10");
SetLampLit("l9", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}
void look10(string &in asTimer)
{
StartPlayerLookAt("l10", 5, 5, "");
AddTimer("", 0.6, "look11");
SetLampLit("l10", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}
void look11(string &in asTimer)
{
StartPlayerLookAt("l11", 5, 5, "");
AddTimer("", 0.6, "look12");
SetLampLit("l11", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}
void look12(string &in asTimer)
{
StartPlayerLookAt("l12", 5, 5, "");
AddTimer("", 0.6, "look13");
SetLampLit("l12", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}
void look13(string &in asTimer)
{
StartPlayerLookAt("l13", 5, 5, "");
AddTimer("", 0.6, "look14");
SetLampLit("l13", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}
void look14(string &in asTimer)
{
StartPlayerLookAt("l14", 5, 5, "");
AddTimer("", 0.6, "look15");
SetLampLit("l14", false, true);
AddTimer("", 0.5, "StopLook");
PlaySoundAtEntity("", "insanity_muffled_steps", "Player", 0, false);
}
void look15(string &in asTimer)
{
SetEntityActive("cotito_vola", true);
AddTimer("", 0.5, "StopLook");
AddTimer("", 0.5, "PlayerActive");
AddTimer("", 0.5, "activar_luces");
AddPropImpulse("cotito_vola", 130, 0, 0, "world");
StartPlayerLookAt("cotito_vola", 5, 5, "");
PlayMusic("21_scream6.ogg",false, 10, 0, 1, false);
}

void activar_luces(string &in asTimer)
{
SetLampLit("l1", true, false);
SetLampLit("l2", true, false);
SetLampLit("l3", true, false);
SetLampLit("l4", true, false);
SetLampLit("l5", true, false);
SetLampLit("l6", true, false);
SetLampLit("l7", true, false);
SetLampLit("l8", true, false);
SetLampLit("l9", true, false);
SetLampLit("l10", true, false);
SetLampLit("l11", true, false);
SetLampLit("l12", true, false);
SetLampLit("l13", true, false);
SetLampLit("l14", true, false);
}
void PlayerActive(string &in asTimer)
{
SetPlayerActive(true);
}
void StopLook(string &in asTimer)
{
StopPlayerLookAt();
}