Frictional Games Forum (read-only)
Questions - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Questions (/thread-25442.html)

Pages: 1 2 3 4 5


RE: UNEXPECTED ERROR - Romulator - 06-06-2014

Well, I can't fix it now, because I have to sleep, but if you can't solve the problem, consider uploading your map and script file somewhere and link us to it - one of us will surely (if not, then I will myself in the morning) have a look at it and correct it.


RE: UNEXPECTED ERROR - Amnesiaplayer - 06-06-2014

What do you mean ? -_-

oww ;S okey Sleepwell Big Grin and thanks for you try!
i'm uploading today... and if no one helps.. i will give the link to you tomorrow Big Grin

And for tomorrow.. my link of the files ( maps AND hps... )
https://www.mediafire.com/?22ktc3cf2256f5z


RE: UNEXPECTED ERROR - Mudbill - 06-06-2014

This is your script at the moment:
PHP Code:
void OnStart()
{
    
AddEntityCollideCallback("Player""Teleport""jumpscare"true1);
}

void jumpscare1(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("jumpscare1"true);
    
AddPropForce("jumpscare1", -1000000"world");
    
PlaySoundAtEntity("""24_iron_maiden.snt""jumpscare1"0false);


You need to change the line
PHP Code:
void jumpscare1(string &in asParentstring &in asChildint alState

to not use the number '1' after jumpscare, like this:
PHP Code:
void jumpscare(string &in asParentstring &in asChildint alState

Edit:
I also checked out your level. The reason the collision isn't detected is because your area is 0 in width. You need to have something more. Try increasing it to 0.25 instead. I tested it and it worked.


RE: UNEXPECTED ERROR - Amnesiaplayer - 06-06-2014

Doesn't work Sad i do every steps.. but why! please check my new post and download my map to test it out... Sad


RE: UNEXPECTED ERROR - Mudbill - 06-06-2014

Did you read my edit?


RE: UNEXPECTED ERROR - Amnesiaplayer - 06-06-2014

Omg thankyou !! thank you really much!! omgg I scared the **** OUT OF MEE
i thougt i did it wrong... omg I ..... Scared too muich :S but really thankss!!!!
alone the way where he goes is wrong.. i'm Trying to fix that with one older post... Thanks!!!


RE: UNEXPECTED ERROR - Mudbill - 06-06-2014

If you want to reverse the direction, remove the minus from the AddPropForce.

PHP Code:
AddPropForce("jumpscare1"1000000"world"); 



RE: UNEXPECTED ERROR - Amnesiaplayer - 06-06-2014

it worked to!!!
thanks mann!!!
Finally !!!
really thanks!!


Unlocking door Error... - Amnesiaplayer - 06-07-2014

Can someone help me please ?!
i made a key and a door... but i don't now what to type in the EXTRA LANGE ENGLI SH thing or something like that... MY key name is : badkey
and my door name is : door1
Sad and i got error in my hps ... unexpected again! i copy and pastE ALONE the things that gives the error... so the other 30+ lines i don't copy!
this is the thing

first of all.
(there are more things and yes i have { and }... )
AddUseItemCallback("", "badkey", "door1", "UsedKeyOnDoor", true);

but they said the error is here...
void UsedKeyOnDoor (string &in asItem, string &in asEntry)
(
SetSwingDoorLocked("door1", false, true);
PlaySoundAtEntry("", "unlock_door.snt", "door1", 0, false);
RemoveItem("badkey");

can someone please help me :S


RE: Unlocking door Error... - Romulator - 06-07-2014

...Assuming that this is the only error in your code:
Quote:void UsedKeyOnDoor(string &in asItem, string &in asEntry)
(
SetSwingDoorLocked("door1", false, true);
PlaySoundAtEntry("", "unlock_door.snt", "door1", 0, false);
RemoveItem("badkey");
You have to use braces ( {} ) and not brackets ( () ) to open and close a void.
Also, there is no script for asEntry or PlaySoundAtEntry. It is asEntity and PlaySoundAtEntity respectively.

PHP Code:
void UsedKeyOnDoor (string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("door1"falsetrue);
PlaySoundAtEntity("""unlock_door.snt""door1"0false);
RemoveItem("badkey");


You can find all the scripts on the wiki at this page: https://wiki.frictionalgames.com/doku.php?id=hpl2/amnesia/script_functions
And you can find a tutorial all about unlocking doors here: https://wiki.frictionalgames.com/hpl2/tutorials/script/scripting_by_xtron_-_item_that_unlocks_a_door