Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 3 Vote(s) - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My problems
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
RE: My problems

(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 Big Grin

i'v set the Y force to 50,000
and it still didn't move a bit fixed

I help people when i'm bored :U


Typing Speed: 74 Words per minute
(This post was last modified: 10-29-2012, 02:55 PM by naseem142.)
10-29-2012, 11:31 AM
Website Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
RE: My problems

SetPropActiveAndFade("Jennifer_the_stone", false, 3); makes stuff disappear , but it doesn't work on enemies.


SetPropActiveAndFade("servant_grunt_3", false, 3);



so if i do this SetEntityActiveAndFade("servant_grunt_3", false, 3); , will it work?

( I wont test , it will take too much time my map is very huge )

I help people when i'm bored :U


Typing Speed: 74 Words per minute
(This post was last modified: 10-29-2012, 02:57 PM by naseem142.)
10-29-2012, 02:57 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
RE: My problems

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/amn..._functions

I went to that site, and searched "Enemy"
Or if the enemy is out of sight, just use SetEntityActive("servant_grunt_3", false);

Trying is the first step to success.
(This post was last modified: 10-29-2012, 03:05 PM by FlawlessHappiness.)
10-29-2012, 03:04 PM
Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
RE: My problems

(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/amn..._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");

I help people when i'm bored :U


Typing Speed: 74 Words per minute
(This post was last modified: 10-29-2012, 03:35 PM by naseem142.)
10-29-2012, 03:34 PM
Website Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
RE: My problems

(10-29-2012, 03:34 PM)naseem142 Wrote: I tried to do FadeEnemyToSmoke("servant_grunt_3", true);
There, fixed.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
10-29-2012, 03:45 PM
Website Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
RE: My problems

That darn error again , just like this one. But it starts from the very end of the file at the last letter.

[Image: uHcBi.png]


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);
}

I help people when i'm bored :U


Typing Speed: 74 Words per minute
10-29-2012, 06:46 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
RE: My problems

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);
}
}

Trying is the first step to success.
(This post was last modified: 10-29-2012, 06:58 PM by FlawlessHappiness.)
10-29-2012, 06:58 PM
Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
RE: My problems

(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

I help people when i'm bored :U


Typing Speed: 74 Words per minute
(This post was last modified: 10-30-2012, 09:11 AM by naseem142.)
10-30-2012, 08:49 AM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
RE: My problems

Maybe it's Doorleft instead of leftDoor. Or try capitals. DoorLeft/LeftDoor

Trying is the first step to success.
10-30-2012, 09:58 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
RE: My problems

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.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-30-2012, 12:47 PM
Find




Users browsing this thread: 1 Guest(s)