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 help me!
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#4
RE: help me!

You've made the same mistake in this script that you did in the previous one you posted.

void LIGHTSOFF(string &in asParent, string &in asChild, int alState)

    SetEntityActive("torch_floor_1");
    SetEntityActive("torch_floor_2");
    SetEntityActive("torch_floor_3");
    SetEntityActive("torch_floor_4");
etc...

Here, there is no { and } surrounding the code in that function. I provided you the solution in your other thread, it's very important that you try to understand why that fix worked

However there is another problem, SetEntityActive requires 2 parameters
SetEntityActive(string& asName, bool abActive);
The name of the entity, which you put in, but also true or false, to say whether the entity
should be activated or deactivated


void LIGHTSOFF(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("torch_floor_1", false);
    SetEntityActive("torch_floor_2", false);
    SetEntityActive("torch_floor_3", false);
    etc...
}

That will make the torches deactivate, hence the 'false'. If you want them to be activated, then use true instead.

EDIT: woops looks like JAP already fixed that and provided a better solution, sorry about that. I'll leave the post as it explains some other extra stuff anyway

(This post was last modified: 05-29-2013, 06:13 PM by Adrianis.)
05-29-2013, 06:09 PM
Find


Messages In This Thread
help me! - by pewds..fan - 05-29-2013, 03:37 PM
RE: help me! - by PutraenusAlivius - 05-29-2013, 03:49 PM
RE: help me! - by pewds..fan - 05-29-2013, 04:03 PM
RE: help me! - by Adrianis - 05-29-2013, 06:09 PM
RE: help me! - by pewds..fan - 05-30-2013, 12:07 PM



Users browsing this thread: 1 Guest(s)