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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spencer Mansion
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#21
RE: Spencer Mansion / Need help with level door script

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.
07-16-2011, 10:11 PM
Find
AlexxShadenk777 Offline
Junior Member

Posts: 40
Threads: 5
Joined: Jul 2011
Reputation: 1
#22
RE: Spencer Mansion / Need help with level door script

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.
07-17-2011, 12:36 AM
Find
AlexxShadenk777 Offline
Junior Member

Posts: 40
Threads: 5
Joined: Jul 2011
Reputation: 1
#23
RE: Spencer Mansion / Need help with level door script

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
07-17-2011, 11:56 PM
Find
plutomaniac Offline
Super Moderator

Posts: 6,368
Threads: 45
Joined: May 2011
Reputation: 183
#24
RE: Spencer Mansion / Need help with level door script

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.
07-18-2011, 01:32 AM
Find
Juby Away
Senior Member

Posts: 290
Threads: 2
Joined: May 2011
Reputation: 5
#25
RE: Spencer Mansion / Need help with level door script

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...

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

Insanity. Static.
(This post was last modified: 07-18-2011, 01:38 AM by Juby.)
07-18-2011, 01:37 AM
Find
AlexxShadenk777 Offline
Junior Member

Posts: 40
Threads: 5
Joined: Jul 2011
Reputation: 1
#26
RE: Spencer Mansion / Need help with level door script

@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
07-18-2011, 01:58 AM
Find
Juby Away
Senior Member

Posts: 290
Threads: 2
Joined: May 2011
Reputation: 5
#27
RE: Spencer Mansion / Need help with level door script

(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

Insanity. Static.
(This post was last modified: 10-29-2011, 03:17 AM by Juby.)
07-18-2011, 02:12 AM
Find
plutomaniac Offline
Super Moderator

Posts: 6,368
Threads: 45
Joined: May 2011
Reputation: 183
#28
RE: Spencer Mansion / Need help with level door script

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
07-18-2011, 02:24 AM
Find
AlexxShadenk777 Offline
Junior Member

Posts: 40
Threads: 5
Joined: Jul 2011
Reputation: 1
#29
RE: Spencer Mansion / Need help with level door script

Thanks Juby, I'll keep that in mind.

Another progress vid. Sorry about the jump cut.
http://www.youtube.com/watch?v=JeY4cWPVAP0
07-20-2011, 05:37 PM
Find




Users browsing this thread: 4 Guest(s)