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
Horror Event Wont work...
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#1
Horror Event Wont work...

Hello my event with scare wont work dont know why any clue hps-->


void OnStart()
{
AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true);
AddEntityCollideCallback("Player", "Horror_Barrel", "Horror_Barrel_Event", true, 1);
}
void NeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Locked_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false);
RemoveItem("hollow_needle_1");
}
void Horror_Barrel_Event(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Horror_Barrel", false);
PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false);
}

void OnEnter()
{
AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1);
}

void Music1(string &in asParent, string &in asChild, int alState)
{
PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true);
}

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
(This post was last modified: 04-04-2012, 04:23 PM by jessehmusic.)
04-04-2012, 09:16 AM
Website Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Horror Event Wont work...

It'd be cool to know what your problem is, instead of us guessing. And with the majority of your posts asking for help I thought you would know this -_-

(This post was last modified: 04-04-2012, 09:34 AM by flamez3.)
04-04-2012, 09:33 AM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#3
RE: Horror Event Wont work...

(04-04-2012, 09:16 AM)jessehmusic Wrote: PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false);
I see the problem. Use another sample than "24_iron_maiden.ogg", or players will groan and be pissed at you. Tongue

Noob scripting tutorial: From Noob to Pro

04-04-2012, 09:45 AM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#4
RE: Horror Event Wont work...

The script dosnt call....

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-04-2012, 03:33 PM
Website Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#5
RE: Horror Event Wont work...

FYI - OnStart () and OnEnter () are the same. You have two of them. Try this:

PS: I HIGHLY suggest removing the over played jumpscare you have in here...

void OnStart()
{
AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true);
AddEntityCollideCallback("Player", "Horror_Barrel", "Horror_Barrel_Event", true, 1);
AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1);
}

void NeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Locked_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false);
RemoveItem("hollow_needle_1");
}

void Horror_Barrel_Event(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Horror_Barrel", false);
PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false);
}

void Music1(string &in asParent, string &in asChild, int alState)

{
PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true);
}

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

(This post was last modified: 04-04-2012, 03:38 PM by JetlinerX.)
04-04-2012, 03:37 PM
Website Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#6
RE: Horror Event Wont work...

(04-04-2012, 03:37 PM)JetlinerX Wrote: FYI - OnStart () and OnEnter () are the same. You have two of them. Try this:

PS: I HIGHLY suggest removing the over played jumpscare you have in here...

void OnStart()
{
AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true);
AddEntityCollideCallback("Player", "Horror_Barrel", "Horror_Barrel_Event", true, 1);
AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1);
}

void NeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Locked_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false);
RemoveItem("hollow_needle_1");
}

void Horror_Barrel_Event(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Horror_Barrel", false);
PlaySoundAtEntity("Horror_Barrel", "24_iron_maiden.snt", "Player", 0, false);
}

void Music1(string &in asParent, string &in asChild, int alState)

{
PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true);
}
Dosnt work :/ Still same prob



http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-04-2012, 03:41 PM
Website Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#7
RE: Horror Event Wont work...

Map has the same name as the script, yes?

Example:

Map01.map
and
Map01.hps

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

04-04-2012, 03:43 PM
Website Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#8
RE: Horror Event Wont work...

(04-04-2012, 03:43 PM)JetlinerX Wrote: Map has the same name as the script, yes?

Example:

Map01.map
and
Map01.hps
yes ofc , the Hallow Needle Addusecallback work



http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-04-2012, 03:44 PM
Website Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#9
RE: Horror Event Wont work...

Have you checked the names of your script areas in the level editor? Also, have you added any Debug messages to check the execution of your scripts?

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

04-04-2012, 03:50 PM
Website Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#10
RE: Horror Event Wont work...

(04-04-2012, 03:50 PM)JetlinerX Wrote: Have you checked the names of your script areas in the level editor? Also, have you added any Debug messages to check the execution of your scripts?
yes....

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-04-2012, 03:52 PM
Website Find




Users browsing this thread: 1 Guest(s)