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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script didn't work...
H. Filipe Offline
Junior Member

Posts: 22
Threads: 6
Joined: Jun 2011
Reputation: 0
#1
Script didn't work...

Hy i am new in this forum and in Scripting too.

I Have a problem with my scripts, i want a lamp to turn on when collide with a area called lampson.

I think the script is right.

void Lamps(string &in asItem, string &in asEntity)
{
     SetLampLit("chandelier_nice_1", false, false);
}

////////////////////////////
// Run On Enter
void OnEnter()
{
AddEntityCollideCallback("Player", "lampson", "Lamps", false, 1);
}

Where is the problem?Huh

E-mail: postal2DeusEx@hotmail.com
Xbox/Live Account: HUGO BOLT 0GTA0

Working on a Custom Story :)
(This post was last modified: 07-04-2011, 07:28 PM by H. Filipe.)
07-04-2011, 04:28 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Script didn't work...

It is best to have everything in the void OnStart() that you did not include...

Try this:

void OnStart()
{
     AddEntityCollideCallback("Player", "lampson", "Lamps", false, 1);
}
void Lamps(string &in asParent, string &in asChild, int alState)
{
     SetLampLit("chandelier_nice_1", false, false);
}

By the way, welcome to the forums!

07-04-2011, 04:32 PM
Find
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#3
RE: Script didn't work...

Yeah.Kyles script is right Wink Welcome to the forums!
07-04-2011, 04:33 PM
Find
H. Filipe Offline
Junior Member

Posts: 22
Threads: 6
Joined: Jun 2011
Reputation: 0
#4
RE: Script didn't work...

Thanks it works.Big Grin

E-mail: postal2DeusEx@hotmail.com
Xbox/Live Account: HUGO BOLT 0GTA0

Working on a Custom Story :)
07-04-2011, 04:37 PM
Find




Users browsing this thread: 1 Guest(s)