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 Message popup on area wont work
Rowzter Offline
Junior Member

Posts: 44
Threads: 12
Joined: Oct 2012
Reputation: 3
#1
Message popup on area wont work

I wrote a script so when i collide with an area a message will pop up on the screen, But it doesn't.

The Part From The Script:

AddEntityCollideCallback("Player", "Blowdoor_1", "Messagepopup", true, 1);



void Messagepopup(string &in asChild, string &in asParent, int alState)
{
SetMessage("Popupmessage_1", "Popup_1", 3);
}


And the .Lang:

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">What The Hell?</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
</CATEGORY>
<CATEGORY Name="Popupmessage_1">
<Entry Name="Popup_1">What The?</Entry>
</CATEGORY>
<CATEGORY Name="Descriptions">
</CATEGORY>
<CATEGORY Name="Levels">


What the hell idi i do wrong? :O
11-13-2012, 11:02 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Message popup on area wont work

How about putting this:

AddEntityCollideCallback("Player", "Blowdoor_1", "Messagepopup", true, 1);



into void OnStart()
{


}


Like this:


void OnStart()
{
AddEntityCollideCallback("Player", "Blowdoor_1", "Messagepopup", true, 1);

}

Trying is the first step to success.
11-13-2012, 11:19 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#3
RE: Message popup on area wont work

It's simple: The messages go to the "Messages" category. So, the lang file should be something like:

<CATEGORY Name="CustomStoryMain">

<Entry Name="Description">What The Hell?</Entry>

</CATEGORY>

<CATEGORY Name="Inventory">

</CATEGORY>

<CATEGORY Name="Messages">

<Entry Name="Popup_1">What The?</Entry>

</CATEGORY>

<CATEGORY Name="Descriptions">

</CATEGORY>

<CATEGORY Name="Levels">

And the script:

AddEntityCollideCallback("Player", "Blowdoor_1", "Messagepopup", true, 1);







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

{

SetMessage("Messages", "Popup_1", 3);

}

Also, get sure that notes work. If something in the .lang file is wrong, everything "dies".

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-13-2012, 11:23 PM
Find
Rowzter Offline
Junior Member

Posts: 44
Threads: 12
Joined: Oct 2012
Reputation: 3
#4
RE: Message popup on area wont work

Forgot to write that the Blowdoor_1 is the name of the area, it triggers a door also, but i think it is possible to use 1 script area for 2 different Funcs
11-13-2012, 11:25 PM
Find




Users browsing this thread: 1 Guest(s)