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
Questions
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#41
RE: OnLeave() where to locate

Post your code from the hps which returns an error please.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
06-07-2014, 03:48 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#42
RE: OnLeave() where to locate

first i had

void OnLeave()
{
void OnStart()
{
AddEntityCollideCallback("Player", "Teleport", "jumpscare", true, 1);
}

void jumpscare(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("jumpscare", true);
AddPropForce("jumpscare", 10000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "jumpscare", 0, false);

and it says unexpected 1,1 or something liek that and if i place it on the end it says Unexpected end of file. Sad
06-07-2014, 03:54 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#43
RE: OnLeave() where to locate

There seems to be a few errors..

Remember that:
- EVERY void opens and closes with the respective braces.
- A void CANNOT be within a void.

This should fix it

PHP Code: (Select All)
void OnLeave()
{

}

void OnStart()
{
AddEntityCollideCallback("Player""Teleport""jumpscare"true1);
}

void jumpscare(string &in asParentstring &in asChildint alState)
{
SetEntityActive("jumpscare"true);
AddPropForce("jumpscare"1000000"world");
PlaySoundAtEntity("""24_iron_maiden.snt""jumpscare"0false);



Edit: I have evidence of you that suggests that all you do copy and paste code. You should try to understand what you are coding, whether you're watching a YouTube video or not. While lengthy, try checking out some of Mudbill's tutorials on Amnesia CS development. While he won't cover teleporting naked guys, he does explain coding and how to perform some cool stuff.

And too, look at the FrictionalGames wiki. It's a nuisance to read, I know, but there is some very helpful stuff there.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 06-07-2014, 04:02 PM by Romulator.)
06-07-2014, 03:59 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#44
RE: OnLeave() where to locate

Thankss Big Grin

i have a question! again :S
what must i type in the script if i want
a naked guy BEHIND the door and the area On the OTHER side of the door.. so if it activates the naked man breaks the door...
so short : a guy breaks a door and the "player"is screaming :S
(This post was last modified: 06-07-2014, 04:10 PM by Amnesiaplayer.)
06-07-2014, 04:07 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#45
RE: (picking key) *steve comes*

Grezt. You can give ppl reputation for being helpfull..
not meaning me or now..
just saying, for fun give ppl some thumbs up.
06-07-2014, 04:12 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#46
RE: Where ?!

On both. But that depends on what you want.

"Veni, vidi, vici."
"I came, I saw, I conquered."
06-07-2014, 05:11 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#47
RE: Where ?!

1st:void OnLeave()
2nd:Use it on the both as SomethingRidiculous said,it's really easy go on the end of .hps file you want and add
Spoiler below!
PHP Code: (Select All)
void OnLeave()
{



06-07-2014, 09:13 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#48
RE: OnLeave() where to locate

About second question make a grunt (Steve) click on it and check box "Activate"
Then add the some pathnodes in Level Editor
Then type the script
Spoiler below!
PHP Code: (Select All)
void OnStart 
{
SetEntityPlayerInteractCallback("NAMEOFAREA""NAMEOFACTION"true);



and

Spoiler below!
PHP Code: (Select All)
void NAMEOFACTION(string &in asEntity)
{
SetEntityActive("NAMEOFMONSTER"true);
AddEnemyPatrolNode("NAMEOFMONSTER""NAMEOFPATHNODE"0"idle");



Yep you have to do some work two and you are like me you make question what will other solve for you,and as many said you WON'T learn by that. Not attacking you i know you are new but give some try Smile

And really if someone helps you (not telling me) you can give some feedback +reputation

By clicking a little box with some green + (plus) under a Profile

About pathnodesBig Grinon't make them to far and if wanna make monster breake door then just put pathnode forward door (Don't make pathnodes where can monster glitch)

(This post was last modified: 06-07-2014, 09:41 PM by Straxedix.)
06-07-2014, 09:36 PM
Find
plutomaniac Offline
Super Moderator

Posts: 6,368
Threads: 45
Joined: May 2011
Reputation: 183
#49
RE: Questions

Merged. Keep this one topic for all your development questions in the same period of time.
(This post was last modified: 06-07-2014, 10:32 PM by plutomaniac.)
06-07-2014, 10:31 PM
Find




Users browsing this thread: 2 Guest(s)