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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
custom story help?
peepeeboynotreal Offline
Junior Member

Posts: 17
Threads: 10
Joined: Jun 2012
Reputation: 4
#1
custom story help?

i'm woking on a custom story and i've ran into to problems to do with the map exiting doors
1: if its locked and needs to be opened with a key. the key dissapears but the door is still locked
2:when its not locked and i try opening it i get a fatal error thats says "ERR: no matching signatures to 'OnLeave()'
main(4,1):ERR: expected'{'."

i have no 'OnLeave()' in my HPS

help please?
06-18-2012, 07:55 AM
Find
Dutton Offline
Member

Posts: 121
Threads: 3
Joined: Apr 2012
Reputation: 2
#2
RE: custom story help?

post your script

[Image: 15isy6C]
06-18-2012, 07:59 AM
Find
peepeeboynotreal Offline
Junior Member

Posts: 17
Threads: 10
Joined: Jun 2012
Reputation: 4
#3
RE: custom story help?

(06-18-2012, 07:59 AM)Dutton Wrote: post your script
void OnStart()
{
AutoSave();
AddUseItemCallback("", "hubkey1", "hubdoor1", "hubunlock", true);
}
void hubunlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("hubdoor1", false, true);
PlaySoundAtEntity("", "unlock_door", "hubdoor1", 0, false);
RemoveItem("hubkey1");
}
tell me if there a prob
06-18-2012, 08:27 AM
Find
Dutton Offline
Member

Posts: 121
Threads: 3
Joined: Apr 2012
Reputation: 2
#4
RE: custom story help?

There seems to be no error in your script.

Did you name your key and door exactly the same as in the script?

[Image: 15isy6C]
06-18-2012, 08:44 AM
Find
peepeeboynotreal Offline
Junior Member

Posts: 17
Threads: 10
Joined: Jun 2012
Reputation: 4
#5
RE: custom story help?

(06-18-2012, 08:44 AM)Dutton Wrote: There seems to be no error in your script.

Did you name your key and door exactly the same as in the script?
yeah
06-18-2012, 08:50 AM
Find
Dutton Offline
Member

Posts: 121
Threads: 3
Joined: Apr 2012
Reputation: 2
#6
RE: custom story help?

Did you post the whole script in your hps file?

Try putting in:
void OnLeave()
{
}


Try deleting your map_cache file.

[Image: 15isy6C]
(This post was last modified: 06-18-2012, 08:55 AM by Dutton.)
06-18-2012, 08:54 AM
Find
peepeeboynotreal Offline
Junior Member

Posts: 17
Threads: 10
Joined: Jun 2012
Reputation: 4
#7
RE: custom story help?

(06-18-2012, 08:54 AM)Dutton Wrote: Did you post the whole script in your hps file?

Try putting in:
void OnLeave()
{
}


Try deleting your map_cache file.
now it just says "expected '{'
should i try a new door?
or have a new key?
06-18-2012, 09:25 AM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#8
RE: custom story help?

void OnStart()
{
AutoSave();
AddUseItemCallback("", "hubkey1", "hubdoor1", "hubunlock", true);
}
void hubunlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("hubdoor1", false, true);
PlaySoundAtEntity("", "unlock_door", "hubdoor1", 0, false);
RemoveItem("hubkey1");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Try dat

06-18-2012, 11:57 AM
Find




Users browsing this thread: 1 Guest(s)