Frictional Games Forum (read-only)
Spencer Mansion - 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)
+--- Thread: Spencer Mansion (/thread-8923.html)

Pages: 1 2 3


RE: Spencer Mansion / Need help with level door script - Zypherzemus - 07-16-2011

I've got nothing man, I'm sorry.. maybe someone with more experience might know?

and it's funny, it might be something so simple as a syntax error..

EDIT: wait... The "0.0f" needs to be an integer, not a float, just make it "0"
Hopefully that's the cause.


RE: Spencer Mansion / Need help with level door script - AlexxShadenk777 - 07-17-2011

Whenever there's a syntax error, the game crashes when loading the map, and prompts me about any and all errors in the script. Naturally this doesn't happen... it's quite frustrating cuz it forces me to just deal with it without being able to move on with this. I really want to invest into this project but it's stuff like this that just demotivates me most successfully.

Anyway... Changed 0.0f to 0, and nothing changed. I tried once again changing the names of key and door to basically initials, hoping that shorter names would do anything, but no cigar.

I ask again, is there any method I could try to script a key to a level door (like a script area to use the key on)? Simply dwelling on this issue doesn't seem to be helping. I mean, either it's inexplicably baffling or it's as simple as something missing, some step anyone hasn't thought of telling me that could be vital. Either something fixes this, or I need to try something else.


RE: Spencer Mansion / Need help with level door script - AlexxShadenk777 - 07-17-2011

I can't put it off any longer. Here's the map with the script. Would be fantastic if anyone could fix this. The door is the second one on the right and I placed the key directly in front of it.

http://www.mediafire.com/?67tqq6qvncai5un


RE: Spencer Mansion / Need help with level door script - plutomaniac - 07-18-2011

make a separate thread with your problem so that more people can see it. Its just an advise. Is it modern? You mentioned flashlite, that's why I asked.


RE: Spencer Mansion / Need help with level door script - Juby - 07-18-2011

I scanned the script (in the .rar uploaded to mediafire)and found and changed a couple things, I haven't tested it out though, but try this...

Code:
void OnStart()
{
    AddUseItemCallback("", "keys_1", "mhb_d", "UseMHBedroom", true);
}

void UseMHBedroom(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("mhb_d", false);
    PlaySoundAtEntity("", "unlock_door.snt", "mhb_d", 0.1f, false);
    RemoveItem(asItem);
}



RE: Spencer Mansion / Need help with level door script - AlexxShadenk777 - 07-18-2011

@plutomaniac:
No, I realized that the flashlight doesn't work in custom stories so I scrapped that idea for the sake of not creating needless problems... ahem. As for a dedicated thread it won't be necessary because...

@Juby:
I can't believe that actually worked. You just basically wrote "Use" in there somewhere, and it worked... This is perfect, thanks so much, I can finally move on with this thing! :D


RE: Spencer Mansion / Need help with level door script - Juby - 07-18-2011

(07-18-2011, 01:58 AM)AlexxShadenk777 Wrote: @Juby:
I can't believe that actually worked. You just basically wrote "Use" in there somewhere, and it worked... This is perfect, thanks so much, I can finally move on with this thing! Big Grin

Yeah, but usually you misspell something here or there and it causes an issue with a function. If you ever need any help with something scripted related, feel free to ask me because I have experience with scripting Smile



RE: Spencer Mansion / Need help with level door script - plutomaniac - 07-18-2011

for the flashlite, try the Item - I think is works on custom stories. Not so sure though...

http://www.frictionalgames.com/forum/thread-7754.html


RE: Spencer Mansion / Need help with level door script - AlexxShadenk777 - 07-20-2011

Thanks Juby, I'll keep that in mind.

Another progress vid. Sorry about the jump cut.
http://www.youtube.com/watch?v=JeY4cWPVAP0