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


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Game Problems
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#1
Game Problems

So, im sure I will have many problems with my custom Story during the editing. So I open a Thread for this problems^^'
So my Problem in this moment is weird....
I want to make a Jump Scare. A grunt Body have to teleporting front of the player. This works perfectly. But it doesnt dissapear. I write in another Area the same but I change from True to False. It doesn't Work...
Why?


This is the using Script:



AddEntityCollideCallback("Player", "ScriptArea_2", "TOTSCHRECK", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "AndereArea2", true, 1);
}

void TOTSCHRECK(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "bam.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("grunt_body_part2_2", true);
}

void AndereArea2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("grunt_body_part2_2", false);
}

Whats wrong?
(This post was last modified: 12-06-2012, 05:04 PM by Fishnugget.)
12-06-2012, 05:00 PM
Find Reply
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Game Problems

Wouldn't it be more logical making a timer for this? Anyways, I don't see anything wrong. Delete map_cache's, check the names, etc.

A timer would be:

AddEntityCollideCallback("Player", "ScriptArea_2", "TOTSCHRECK", true, 1);

}



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

{

PlaySoundAtEntity("", "bam.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);

SetEntityActive("grunt_body_part2_2", true);
AddTimer("", secondstodoit, "AndereArea2");

}



void AndereArea2(string &in asTimer)

{

PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);

SetEntityActive("grunt_body_part2_2", false);

}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-06-2012, 05:14 PM
Find Reply
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#3
RE: Game Problems

Now comes this:
http://i46.servimg.com/u/f46/17/76/85/90/2012_112.jpg
12-06-2012, 05:32 PM
Find Reply
xxxxxxxxxxxxxxxx Away
Posting Freak

Posts: 935
Threads: 0
Joined: Jun 2012
Reputation: 54
#4
RE: Game Problems

Even though I'm a complete and utter scripting-noob, that made me chuckle Big Grin

(Try writing the amount of seconds there, not the word "secondstodoit"...)
(This post was last modified: 12-06-2012, 05:41 PM by xxxxxxxxxxxxxxxx.)
12-06-2012, 05:40 PM
Find Reply
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#5
RE: Game Problems

(12-06-2012, 05:32 PM)Fishnugget Wrote: Now comes this:
http://i46.servimg.com/u/f46/17/76/85/90/2012_112.jpg
Ehem... it was a text for you to understand what to put... you must put a number (the seconds to do it).
Like:

AddTimer("", 1, "AndereArea2");

You just copy-pasted the script, right?

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-06-2012, 06:21 PM
Find Reply
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#6
RE: Game Problems

I want that a door explodes, when I arrive in an area. How can I make that?
12-07-2012, 07:21 AM
Find Reply
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: Game Problems

When you collide with the area use the line:
SetPropHealth("INSERTDOORNAMEHERE", 0);

Trying is the first step to success.
12-07-2012, 08:03 AM
Find Reply
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#8
RE: Game Problems

Thats the whole Script?
Don't I have to write wich area?
12-07-2012, 08:06 AM
Find Reply
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#9
RE: Game Problems

Of course you do! But if you don't know how to write it, then i recommend you to check out basic scripting first Wink I can reveal that you have to use AddEntityCollideCallback. Makes sense since you collide with an area Smile
Then use the line i provided

Trying is the first step to success.
12-07-2012, 08:55 AM
Find Reply
Fishnugget Offline
Member

Posts: 72
Threads: 6
Joined: Aug 2012
Reputation: 1
#10
RE: Game Problems

Does an Tutorial exist? Sorry i dont get it^^'
12-07-2012, 02:27 PM
Find Reply




Users browsing this thread: 1 Guest(s)