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
HELP!!!
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#21
RE: HELP!!!

I'm sorry I don't quite understand your question.

04-17-2012, 01:14 AM
Find
JPPSJ Offline
Junior Member

Posts: 20
Threads: 2
Joined: Apr 2012
Reputation: 0
#22
RE: HELP!!!

(04-17-2012, 01:14 AM)Putmalk Wrote: I'm sorry I don't quite understand your question.
Ok, i wont copy it. but is this the format?
void OnStart()
{
//player collide with slamdoor
AddEntityCollideCallback("Player", "AreaSlamDoor", "SlamDoor", true, 0);
}

void OnEnter()
{

}

void OnLeave()
{

}

void SlamDoor(string &in asParent, string &in asChild, int alState)
{
//slam door, with sound, effect, and sanity damage
SetSwingDoorLocked("mansion_1", true, true);
GiveSanityDamage(10, true);
PlaySoundAtEntity("doorslam", "15_slam_door.snt", "mansion_1", 0.4f, false);
}


04-17-2012, 01:18 AM
Find
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#23
RE: HELP!!!

Yes, that looks correct at a glance. If you get an error, it's probably a random syntax error, you will have to fix them and get used to debugging, everyone has to do it. Smile

You'll get the hang of this.

04-17-2012, 01:27 AM
Find
JPPSJ Offline
Junior Member

Posts: 20
Threads: 2
Joined: Apr 2012
Reputation: 0
#24
RE: HELP!!!

(04-17-2012, 01:18 AM)JPPSJ Wrote:
(04-17-2012, 01:14 AM)Putmalk Wrote: I'm sorry I don't quite understand your question.
Ok, i wont copy it. but is this the format?
void OnStart()
{
//player collide with slamdoor
AddEntityCollideCallback("Player", "AreaSlamDoor", "SlamDoor", true, 0);
}

void OnEnter()
{

}

void OnLeave()
{

}

void SlamDoor(string &in asParent, string &in asChild, int alState)
{
//slam door, with sound, effect, and sanity damage
SetSwingDoorLocked("mansion_1", true, true);
GiveSanityDamage(10, true);
PlaySoundAtEntity("doorslam", "15_slam_door.snt", "mansion_1", 0.4f, false);
}
Do i have to open the door in the editor???

04-17-2012, 01:28 AM
Find
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#25
RE: HELP!!!

Again, I don't understand. When you place the door, it should be in the closed position. If you want, there's a value you can set in the editor that opens the door (it won't update in the editor, but will open in the game).

04-17-2012, 01:33 AM
Find
JPPSJ Offline
Junior Member

Posts: 20
Threads: 2
Joined: Apr 2012
Reputation: 0
#26
RE: HELP!!!

(04-17-2012, 01:33 AM)Putmalk Wrote: Again, I don't understand. When you place the door, it should be in the closed position. If you want, there's a value you can set in the editor that opens the door (it won't update in the editor, but will open in the game).

It didnt work! this is what i used...
void OnStart()
{
AddEntityCollideCallback("Player", "AreaSlamDoor", "SlamDoor", true, 0);
}

void OnEnter()
{

}

void OnLeave()
{

}

void SlamDoor(string &in asParent, string &in asChild, int alState)
{

SetSwingDoorLocked("mansion_1", true, true);
GiveSanityDamage(10, true);
PlaySoundAtEntity("doorslam", "15_slam_door.snt", "mansion_1", 0.4f, false);
}

04-17-2012, 01:39 AM
Find
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#27
RE: HELP!!!

Describe to me the error.

Was it a crash error?

Did nothing happen when you went into the area?

Did anything in the SlamDoor function play? (a sound, sanity damage?)

(This post was last modified: 04-17-2012, 01:45 AM by Putmalk.)
04-17-2012, 01:45 AM
Find
JPPSJ Offline
Junior Member

Posts: 20
Threads: 2
Joined: Apr 2012
Reputation: 0
#28
RE: HELP!!!

(04-17-2012, 01:45 AM)Putmalk Wrote: Describe to me the error.

Was it a crash error?

Did nothing happen when you went into the area?

Did anything in the SlamDoor function play? (a sound, sanity damage?)

i walked through the area and nothing happend. just like all my other attempts.


04-17-2012, 01:46 AM
Find
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#29
RE: HELP!!!

Are your areas properly named?

In the editor, is it called AreaSlamDoor and mansion_1?

(This post was last modified: 04-17-2012, 02:03 AM by Putmalk.)
04-17-2012, 02:02 AM
Find
JPPSJ Offline
Junior Member

Posts: 20
Threads: 2
Joined: Apr 2012
Reputation: 0
#30
RE: HELP!!!

(04-17-2012, 02:02 AM)Putmalk Wrote: Are your areas properly named?

In the editor, is it called AreaSlamDoor and mansion_1?

WAit, does the caps need to be correct??


04-17-2012, 02:05 AM
Find




Users browsing this thread: 2 Guest(s)