RE: My problems - naseem142 - 10-29-2012
(10-29-2012, 11:29 AM) andyrockin123 Wrote: You'll need a lot of prop force, use this function and place the value anywhere from the hundreds to the thousands:
AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
You have to experiment a lot with prop force; it can vary greatly from one object to the next. Lol , that explains why in the tutorial on the wiki had 5000.0f
I just thought that is too much , thanks
i'v set the Y force to 50,000
and it still didn't move a bit fixed
RE: My problems - naseem142 - 10-29-2012
SetPropActiveAndFade("Jennifer_the_stone", false, 3); makes stuff disappear , but it doesn't work on enemies.
SetProp ActiveAndFade("servant_grunt_3", false, 3);
so if i do this SetEntity ActiveAndFade("servant_grunt_3", false, 3); , will it work?
( I wont test , it will take too much time my map is very huge )
RE: My problems - FlawlessHappiness - 10-29-2012
Nope that is not a script line. You cannot modify a script line. Instead use: FadeEnemyToSmoke(string& asName, bool abPlaySound);
http://wiki.frictionalgames.com/hpl2/amnesia/script_functions
I went to that site, and searched "Enemy"
Or if the enemy is out of sight, just use SetEntityActive("servant_grunt_3", false);
RE: My problems - naseem142 - 10-29-2012
(10-29-2012, 03:04 PM) beecake Wrote: Nope that is not a script line. You cannot modify a script line. Instead use: FadeEnemyToSmoke(string& asName, bool abPlaySound);
http://wiki.frictionalgames.com/hpl2/amnesia/script_functions
I went to that site, and searched "Enemy"
Or if the enemy is out of sight, just use SetEntityActive("servant_grunt_3", false); There is a if enemy is out sight function? if yes tell me what is it , it wold be very useful.
_______________________
I tried to do FadeEnemyToSmoke("servant_grunt_3", "But i don't know what to put here" );
RE: My problems - Robby - 10-29-2012
(10-29-2012, 03:34 PM) naseem142 Wrote: I tried to do FadeEnemyToSmoke("servant_grunt_3", true ); There, fixed.
RE: My problems - naseem142 - 10-29-2012
That darn error again , just like this one. But it starts from the very end of the file at the last letter.
Can anyone please help me, i searched the whole script for anything missing.
__________________________________________
Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player", "Message_7", "Message7", true, 1);
AddUseItemCallback("", "orb_door1", "orbchamber1_1", "KeyOnDoor111", true);
AddUseItemCallback("", "orb_door2", "orbchamber1_2", "KeyOnDoor1111", true);
AddUseItemCallback("", "Key_3", "Prison_11", "KeyOnDoor11", true);
AddUseItemCallback("", "des_orb", "Map_3_go", "KeyOnDoor11337", true);
SetLocalVarInt("Var1", 0);
SetEntityPlayerInteractCallback("button1", "func1", true);
SetEntityPlayerInteractCallback("button2", "func2", true);
SetEntityPlayerInteractCallback("button3", "func3", true);
AddEntityCollideCallback("Player", "Message_4", "Message4", true, 1);
AddEntityCollideCallback("Player", "Message_6", "Message6", true, 1);
AddEntityCollideCallback("Player" , "brutetrap_scriptarea" , "MonsterFunc1" , true , 1);
AddEntityCollideCallback("Player" , "grunttrap_scriptarea" , "MonsterFunc2" , true , 1);
AddEntityCollideCallback("Player" , "body_trap_script_area" , "bodytrapfunc" , true , 1);
AddEntityCollideCallback("Player", "brutetrapsoundarea", "Sound", true, 1);
AddEntityCollideCallback("Player", "Message_5", "Message5", true, 1);
AddEntityCollideCallback("Player", "Message_3", "Message3", true, 1);
AddEntityCollideCallback("Player", "slamdoor", "func_slam", true, 1);
AddEntityCollideCallback("Player", "slamdoor2", "func_slam2", true, 1);
AddEntityCollideCallback("Player", "Play_Music_Script_Area", "PlayMusic1", true, 1);
AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1);
AddUseItemCallback("", "crowbar_1", "mansiondoor_1", "UsedCrowbarOnDoor", true);
AddEntityCollideCallback("crowbar_joint_1", "ScriptArea_1", "CollideAreaBreakDoor", true, 1);
SetEntityCallbackFunc("des_orb", "OnPickup125");
SetEntityCallbackFunc("crowbar_1", "OnPickup1255");
}
void KeyOnDoor11337(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Map_3_go", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Map_3_go", 0.0f, true);
}
void OnPickup1255(string &in asEntity, string &in type)
{
PlaySoundAtEntity("", "screamaa.ogg", "22", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("11", true);
SetEntityActive("22", true);
SetEntityActive("33", true);
SetEntityActive("44", true);
SetEntityActive("55", true);
}
void UsedCrowbarOnDoor(string &in asItem, string &in asEntity)
{
AddTimer("", 0.2, "TimerSwitchShovel");
RemoveItem("crowbar_1");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Map_3_go", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Map_3_go", 0, false);
RemoveItem("key_1");
}
void OnPickup125(string &in asEntity, string &in type)
{
SetEntityActive("servant_brute_125", true);
ShowEnemyPlayerPosition("servant_brute_125");
SetMessage("Messages", "Popup8", 0);
}
void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("","puzzle_place_jar.snt", "", 0, false);
SetEntityActive("crowbar_joint_1", true);
}
void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState)
{
AddPlayerSanity(25);
PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);
SetSwingDoorLocked("mansiondoor_1", false, true);
AddPropImpulse("mansiondoor_1", 0, 0, -50, "World");
SetSwingDoorDisableAutoClose("mansiondoor_1", true);
SetSwingDoorClosed("mansiondoor_1", false, false);
SetMoveObjectState("mansiondoor_1", 1);
PlaySoundAtEntity("","break_wood_metal", "AreaBreakEffect", 0, false);
CreateParticleSystemAtEntity("", "ps_hit_wood", "AreaBreakEffect", false);
SetEntityActive("crowbar_joint_1", false);
SetLocalVarInt("Door", 1);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
void bodytrapfunc(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("body_trap" , true);
GiveSanityDamage(5.0f, true);
}
void PlayMusic1(string &in asParent, string &in asChild, int alState)
{
PlayMusic("91229_Scary_Ambient_Fright.ogg", true, 1, 1, 0, false);
}
void PlayMusic(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("sound", "brutetrapsound.ogg", "brutetrapsoundarea", 0.0, false);
}
void LightsOut(string &in asParent, string &in asChild, int alState)
{
SetLampLit("lamp_1", false, true);
AddTimer("", 0.1, "Out2");
}
void Out2(string &in asTimer)
{
SetLampLit("lamp_2", false, true);
AddTimer("", 0.1, "Out3");
}
void Out3(string &in asTimer)
{
SetLampLit("lamp_3", false, true);
AddTimer("", 0.1, "Out4");
}
void Out4(string &in asTimer)
{
SetLampLit("lamp_4", false, true);
AddTimer("", 0.1, "Out5");
}
void Out5(string &in asTimer)
{
SetLampLit("lamp_5", false, true);
AddTimer("", 0.1, "Out6");
}
void Out6(string &in asTimer)
{
SetLampLit("lamp_6", false, true);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("brutetrap" , true);
}
void MonsterFunc2(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("trapgrunt3" , true);
ShowEnemyPlayerPosition("trapgrunt3");
AddTimer("", 20.0f, "GruntDisable3");
}
void GruntDisable3(string &in asTimer)
{
SetEntityActive("trapgrunt3", false);
SetMessage("Messages", "Popup7", 0);
}
void KeyOnDoor11(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Prison_11", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Prison_11", 0.0f, true);
RemoveItem("key_3");
}
void KeyOnDoor111(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("orbchamber1_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "orbchamber1_1", 0.0f, true);
RemoveItem("orb_door1");
}
void KeyOnDoor1111(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("orbchamber1_2", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "orbchamber1_2", 0.0f, true);
RemoveItem("orb_door2");
}
void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup4", 0);
}
void Message3(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup5", 0);
}
void Message5(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup5", 0);
}
void Message6(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup6", 0);
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("doorman", true, true);
SetSwingDoorLocked("doorman", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
void func_slam2(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("orbchamber1_2", true, true);
SetSwingDoorLocked("orbchamber1_2", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
void func1(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}
void func2(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}
void func3(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}
void func4(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}
void func5()
{
if(GetLocalVarInt("Var1") == 3)
{
SetSwingDoorLocked("doorman", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "doorman", 0.5f, false);
AddPlayerSanity(10);
}
RE: My problems - FlawlessHappiness - 10-29-2012
void func5()
{
if(GetLocalVarInt("Var1") == 3)
{
SetSwingDoorLocked("doorman", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "doorman", 0.5f, false);
AddPlayerSanity(10);
}
Look at your last function here. You have 2 { but only 1 }... They must be equal
I suggest:
void func5()
{
if(GetLocalVarInt("Var1") == 3)
{
SetSwingDoorLocked("doorman", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "doorman", 0.5f, false);
AddPlayerSanity(10);
}
}
RE: My problems - naseem142 - 10-30-2012
(10-29-2012, 06:58 PM) beecake Wrote: void func5()
{
if(GetLocalVarInt("Var1") == 3)
{
SetSwingDoorLocked("doorman", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "doorman", 0.5f, false);
AddPlayerSanity(10);
}
Look at your last function here. You have 2 { but only 1 }... They must be equal
I suggest:
void func5()
{
if(GetLocalVarInt("Var1") == 3)
{
SetSwingDoorLocked("doorman", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "doorman", 0.5f, false);
AddPlayerSanity(10);
}
} Thank you it worked x3 , you saved my map!
__________________
Can i push wardrobe doors open like doors?
EDIT: i used
void trap_grun_ward(string &in asParent, string &in asChild, int alState)
{
AddBodyForce("cabinet_nice_1_rightDoor", 0, 0, -900, "world");
AddBodyForce("cabinet_nice_1_leftDoor", 0, 0, -900, "world");
}
But the cabinet doors didn't open
RE: My problems - FlawlessHappiness - 10-30-2012
Maybe it's Doorleft instead of leftDoor. Or try capitals. DoorLeft/LeftDoor
RE: My problems - The chaser - 10-30-2012
Check the names in the model editor. Open the .ent and check the green boxes that cover the cabinet doors.
Also, be completely sure that you use enough force, and that you are pushing it the right way.