Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: OnLeave() where to locate
Post your code from the hps which returns an error please.
Discord: Romulator#0001
|
|
06-07-2014, 03:48 PM |
|
Amnesiaplayer
Senior Member
Posts: 539
Threads: 105
Joined: Jun 2014
Reputation:
0
|
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.
|
|
06-07-2014, 03:54 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
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
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); }
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
(This post was last modified: 06-07-2014, 04:02 PM by Romulator.)
|
|
06-07-2014, 03:59 PM |
|
Amnesiaplayer
Senior Member
Posts: 539
Threads: 105
Joined: Jun 2014
Reputation:
0
|
RE: OnLeave() where to locate
Thankss
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 |
|
DnALANGE
Banned
Posts: 1,549
Threads: 73
Joined: Jan 2012
|
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 |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
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 |
|
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
|
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
|
|
06-07-2014, 09:13 PM |
|
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
|
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
and
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
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 pathnodeson'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 |
|
plutomaniac
Super Moderator
Posts: 6,368
Threads: 45
Joined: May 2011
Reputation:
183
|
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 |
|
|