Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


IN NEED OF SCRIPTING HELP
Nuite Offline
Junior Member

Posts: 2
Threads: 1
Joined: Sep 2011
Reputation: 0
#1
IN NEED OF SCRIPTING HELP

Hi, i wanted something cool with prophealth so i did this:


void OnStart()
{
GiveItemFromFile("lantern", "lantern.ent");
AddEntityCollideCallback("door1", "chair1", "break1", true, 0);
}

void break1()
{
AddPropHealth("door1", -100);
}


That is my scripting so far, and in this case i wanted a chair (chair1) to break a door (door1) when it collided (i.e. throwing the chair at the door)
It doesn't seem to work...
what am i doing wrong? Thanks!Smile
09-17-2011, 12:59 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#2
RE: IN NEED OF SCRIPTING HELP

U sure u didn't want to post that into amnesia custom story helps Tongue?

The Interrogation
Chapter 1

My tutorials
09-17-2011, 09:05 PM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#3
RE: IN NEED OF SCRIPTING HELP

You forgot the callback syntax. ^^
void OnStart()
{
GiveItemFromFile("lantern", "lantern.ent");
AddEntityCollideCallback("door1", "chair1", "break1", true, 0);
}

void break1(string &in asParent, string &in asChild, int alState)
{
AddPropHealth("door1", -100);
}

TRY THAT! Big Grin

Ba-da bing, ba-da boom.
09-17-2011, 10:14 PM
Find
Nuite Offline
Junior Member

Posts: 2
Threads: 1
Joined: Sep 2011
Reputation: 0
#4
RE: IN NEED OF SCRIPTING HELP

Did that now, result: Game crashes while loading my map, ideas?
09-17-2011, 11:07 PM
Find
neocrawler Offline
Member

Posts: 57
Threads: 19
Joined: Sep 2011
Reputation: 1
#5
RE: IN NEED OF SCRIPTING HELP

void OnStart()
{
GiveItemFromFile("lantern", "lantern.ent");
AddEntityCollideCallback("chair1", "door1", "break1", true, 1);
}

void break1(string &in asParent, string &in asChild, int alState)
{
AddPropHealth("door1", -100);
}
try this it will maybe change something. Instead you say when door1 comes into chair's1 area break. you say when chair1 enters door's1 area break

09-29-2011, 10:36 PM
Website Find




Users browsing this thread: 1 Guest(s)