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
Script Help It just doesn't work! <-[SOLVED] 1 more thing...[SOLVED]
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#1
It just doesn't work! <-[SOLVED] 1 more thing...[SOLVED]

I'm at the edge of my nerve system now because I am JUST ABOUT to finish my custom story and I have 4 script areas left.
3 of them is to display a message (to close the plot, of course) and the last 1 is the credits area.


I have set them up and everything is correct
(otherwise the game would display errors and the map wont open entirely) and etc.

Soooo what's the problem?

They. Simply. Refuse. To work.

Here's the HPS (its not a complete hps, of course. just the 4 areas):

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "TruthOne", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "TruthTwo", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "TruthThree", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "credits", true, 1);
}

void TruthOne(string &in asEntity, int alState)
{
SetMessage("Truth", "One", 0);
SetPlayerRunSpeedMul(0.1);
StopSound("01_amb_darkness.ogg", 3);
}

void TruthTwo(string &in asEntity, int alState)
{
SetMessage("Truth", "Two", 0);
PlayMusic("01_paper_self.ogg", true, 1.0, 0, 0, false);
}

void TruthThree(string &in asEntity, int alState)
{
SetMessage("Truth", "Three", 0);
}

void credits(string &in asEntity, int alState)
{
FadeOut(0.1);
StartCredits("ending.ogg", true, "Ending", "MainCredits", 0);
}

Any ideas on why aren't they working?

PS: the 'ending.ogg' is in my CustomStoryName>music file. I guess it will work?

Thanks in advance :]
(This post was last modified: 02-11-2012, 08:03 PM by Zjurc.)
02-11-2012, 03:41 PM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: It just doesn't work!

You have the callback syntax wrong.

Tutorials: From Noob to Pro
02-11-2012, 03:48 PM
Website Find Reply
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#3
RE: It just doesn't work!

To clarify:

(string &in asEntity, int alState) Isn't the right syntax for AddEntityColideCallback c:

02-11-2012, 03:58 PM
Find Reply
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#4
RE: It just doesn't work!

LOL okay im mentally retarded..... well whats the right one then?
02-11-2012, 04:23 PM
Find Reply
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#5
RE: It just doesn't work!

You can find it here:

http://wiki.frictionalgames.com/hpl2/amn...ons#player


c:

02-11-2012, 04:26 PM
Find Reply
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#6
RE: It just doesn't work!

Oh found it! Thank you very much! Ill go and set it up now and report if it works Big Grin
Yep. Works now! Thank you both for helping me Big Grin
(This post was last modified: 02-11-2012, 04:39 PM by Zjurc.)
02-11-2012, 04:28 PM
Find Reply
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#7
RE: It just doesn't work!

1 More thing - and hopefully this will be my last question to annoy you guys:

This is the most retarded question you will get and you will probably laugh too, but how to Save? I mean, for example you enter a map and I want to save just there. So probably the Save command will go on Void OnStart?

I guess the command is " AutoSave(); "? But still when I put it, it still just says 'Exit'

If you didn't understand entirely: when I want to quit, I want it to say 'Save And Exit' instead of 'Exit'.

My map is quite long (~1-2hrs) so its kinda important for me. Thanks!
02-11-2012, 07:14 PM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#8
RE: It just doesn't work! <-[solved] 1 more thing...

Make sure ExitMenuDirectly is false: http://wiki.frictionalgames.com/hpl2/amn...evenvguide

Tutorials: From Noob to Pro
02-11-2012, 07:34 PM
Website Find Reply
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#9
RE: It just doesn't work! <-[solved] 1 more thing...

Ahh thank you very much! I'm so sorry for taking your time at these retarded things!
02-11-2012, 08:03 PM
Find Reply




Users browsing this thread: 1 Guest(s)