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 Make a light flicker?
DaAinGame Offline
Member

Posts: 90
Threads: 11
Joined: Mar 2012
Reputation: 4
#5
RE: Make a light flicker?

(03-20-2012, 06:12 AM)TheLastGreyKnight Wrote:
(03-20-2012, 04:13 AM)Your Computer Wrote: Semicolons are not part of function headers. As for the other issue, (string, bool) is not the syntax for collision callbacks.
I tried "fixing it" to best of my ability's but now I get a new error. "FATAL ERROR: Could not load script file (my custom story) main (22, 21) : ERR : Expected data type.

From what you said I did this to try and fix it.

AddEntityCollideCallback("Player", "LightOff", "LightFlicker_1", true, 1);




void LightFlicker_1("LightOff", false)
{
SetLightFlickerActive("LightOff", false);
}



I feel so needy posting for help, but as I said I've literally been scripting for only about 19 hours now so I'm a complete noob at it ;/
In the void part you messed up. If your using a script area to call upon that function it should be:

AddEntityCollideCallback("Player", "LightOff", "LightFlicker_1", true, 1);




void LightFlicker_1(string &in asParent, string &in asChild, int alState)
{
SetLightFlickerActive("LightOff", false);
}

And don't feel bad, getting use to the script takes some time. For some, they catch onto it right away. About 48 hours after being introduced to the new language I had a a pretty solid grasp of it. Feel free to ask if any more errors persist, but i think that it should work now. Also here's a useful website!
http://wiki.frictionalgames.com/hpl2/amn..._functions


Realm Of Another Chapter 1: http://www.frictionalgames.com/forum/thread-14142.html
Realm Of Another Chapter 2: Postponed
Adder Halls: 5%
03-20-2012, 07:07 AM
Find


Messages In This Thread
Make a light flicker? - by TheLastGreyKnight - 03-20-2012, 03:56 AM
RE: Make a light flicker? - by Your Computer - 03-20-2012, 04:13 AM
RE: Make a light flicker? - by TheLastGreyKnight - 03-20-2012, 06:12 AM
RE: Make a light flicker? - by DaAinGame - 03-20-2012, 07:07 AM
RE: Make a light flicker? - by Your Computer - 03-20-2012, 07:03 AM
RE: Make a light flicker? - by TheLastGreyKnight - 03-20-2012, 07:11 AM
RE: Make a light flicker? - by Your Computer - 03-20-2012, 07:19 AM



Users browsing this thread: 2 Guest(s)