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 Script not working
aceuniverse Offline
Junior Member

Posts: 3
Threads: 2
Joined: Aug 2012
Reputation: 0
#1
Script not working

bear with me on this I'm brand new to scripting in Amensia

I wanted a lever ("lever_1") to collide with the area ("lever_area"), then cause lever_1, lever_mount to disappear while the real lever is activated


void onStart()
{
AddEntityCollideCallback("lever_1", "lever_area", "levervisible", false, 1);

}

void OnEnter(){
}

void OnLeave(){

}

void levervisible(string &in Parent, string &in Child, int state) {
SetEntityActive("lever_1", false);
SetEntityActive("lever_mount", false);
SetEntityActive("actual_lever", true);
}
08-10-2012, 12:46 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Script not working

the "onStart" needs to be spelled "OnStart", you also had a few bracket mistakes. Here ya go:


void OnStart()
{
AddEntityCollideCallback("lever_1", "lever_area", "levervisible", false, 1);
}

void OnEnter()
{

}

void OnLeave()
{

}

void levervisible(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("lever_1", false);
SetEntityActive("lever_mount", false);
SetEntityActive("actual_lever", true);
}


Hope that helped.

I rate it 3 memes.
08-10-2012, 12:50 AM
Find
aceuniverse Offline
Junior Member

Posts: 3
Threads: 2
Joined: Aug 2012
Reputation: 0
#3
RE: Script not working

it worked perfectly! Thanks so much!
08-10-2012, 01:01 AM
Find




Users browsing this thread: 1 Guest(s)