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
How to fix the error
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#11
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
Find
Josh9810 Offline
Junior Member

Posts: 34
Threads: 9
Joined: Oct 2012
Reputation: 0
#12
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
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#13
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)
[Image: k6vbdhu]

Aculy iz dolan.
10-24-2012, 09:13 AM
Find
Josh9810 Offline
Junior Member

Posts: 34
Threads: 9
Joined: Oct 2012
Reputation: 0
#14
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
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#15
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)
[Image: k6vbdhu]

Aculy iz dolan.
10-24-2012, 09:41 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#16
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
Find
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#17
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?

[Image: 2H1Mc.jpg]
(This post was last modified: 10-24-2012, 11:32 AM by ZodiaC.)
10-24-2012, 11:28 AM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#18
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.

[Image: 18694.png]
(This post was last modified: 10-24-2012, 01:11 PM by Ongka.)
10-24-2012, 01:11 PM
Find
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#19
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++

[Image: 2H1Mc.jpg]
10-24-2012, 02:05 PM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#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.

[Image: 18694.png]
10-24-2012, 04:39 PM
Find




Users browsing this thread: 2 Guest(s)