FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: How to fix the error
AddEntityCollideCallback("Brute", "MonsterDisappearArea", "Monsterdisappear", true, 1);
Add this to you void OnStart()
Otherwise the brute will just collide with the script but not calling the function.
You will need to rename the are ("MonsterDisappearArea") because i don't think that's what you called it
Trying is the first step to success.
|
|
10-24-2012, 07:02 AM |
|
Josh9810
Junior Member
Posts: 34
Threads: 9
Joined: Oct 2012
Reputation:
0
|
RE: How to fix the error
I completed the chasing after 100 tries of out running the grunts
I wanna know how to change the name of the key because it just says "picked up" but I want it to be called bedroomkey_1 or something.
doesnt work aswell the entityactivate false thing
(This post was last modified: 10-24-2012, 07:56 AM by Josh9810.)
|
|
10-24-2012, 07:31 AM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: How to fix the error
(10-24-2012, 07:31 AM)Josh9810 Wrote: I completed the chasing after 100 tries of out running the grunts
I wanna know how to change the name of the key because it just says "picked up" but I want it to be called bedroomkey_1 or something.
doesnt work aswell the entityactivate false thing Do this in your script:
void OnStart()
{
AddEntityCollideCallback("Brute", "ScriptArea_disappear", "LOL", true, 1);
}
void LOL (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Brute", false);
}
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
10-24-2012, 09:13 AM |
|
Josh9810
Junior Member
Posts: 34
Threads: 9
Joined: Oct 2012
Reputation:
0
|
RE: How to fix the error
(10-24-2012, 09:13 AM)The chaser Wrote: Do this in your script:
void OnStart()
{
AddEntityCollideCallback("Brute", "ScriptArea_disappear", "LOL", true, 1);
}
void LOL (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Brute", false);
} Yeah that one doesnt work sadly he sometimes seems to disappear
|
|
10-24-2012, 09:22 AM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: How to fix the error
(10-24-2012, 09:22 AM)Josh9810 Wrote: (10-24-2012, 09:13 AM)The chaser Wrote: Do this in your script:
void OnStart()
{
AddEntityCollideCallback("Brute", "ScriptArea_disappear", "LOL", true, 1);
}
void LOL (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Brute", false);
} Yeah that one doesnt work sadly he sometimes seems to disappear Check the names, they are sometimes different. When you re-name something, be sure that you Enter when finished, or otherwise the name will stay.
SetEntityActive("brute", false); ////This should work.
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
10-24-2012, 09:41 AM |
|
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
|
RE: How to fix the error
To give names to keys you have to write it in your .lang file. I do not have my working computer in front of me right now, so search for it on the forum
Trying is the first step to success.
|
|
10-24-2012, 09:50 AM |
|
ZodiaC
Member
Posts: 120
Threads: 8
Joined: Oct 2012
Reputation:
2
|
RE: How to fix the error
(10-24-2012, 07:31 AM)Josh9810 Wrote: I wanna know how to change the name of the key because it just says "picked up" but I want it to be called bedroomkey_1 or something. you have to add in your lang file this:
<CATEGORY Name="Inventory">
<Entry Name="ItemName_KeyName">bedroomkey_1</Entry>
<Entry Name="ItemDesc_KeyName">The key to the bedroom door.</Entry>
</CATEGORY>
You may need to change the KeyName. And if you need to add more items just add the same lines above the " </CATEGORY>".
(10-24-2012, 09:41 AM)The chaser Wrote: SetEntityActive("brute", false); ////This should work. So if the entity is registered as "brute" in the Level Editor and you use the name " Brute" in the script it wont work?
(This post was last modified: 10-24-2012, 11:32 AM by ZodiaC.)
|
|
10-24-2012, 11:28 AM |
|
Ongka
Member
Posts: 225
Threads: 3
Joined: Nov 2010
Reputation:
20
|
RE: How to fix the error
Quote: So if the entity is registered as "brute" in the Level Editor and you use the name "Brute" in the script it wont work?
In most cases it doesn't, because C++ is case-sensitive, so make sure to write everything exactly how you did in the editor.
(This post was last modified: 10-24-2012, 01:11 PM by Ongka.)
|
|
10-24-2012, 01:11 PM |
|
ZodiaC
Member
Posts: 120
Threads: 8
Joined: Oct 2012
Reputation:
2
|
RE: How to fix the error
(10-24-2012, 01:11 PM)Ongka Wrote: In most cases it doesn't, because C++ is case-sensitive, so make sure to write everything exactly how you did in the editor. Hmm I thought it was angelscript and not C++
|
|
10-24-2012, 02:05 PM |
|
Ongka
Member
Posts: 225
Threads: 3
Joined: Nov 2010
Reputation:
20
|
RE: How to fix the error
It is, but angelscript uses C++ syntax and as a result pretty much the same rules apply to it.
|
|
10-24-2012, 04:39 PM |
|
|