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 [unsolved]Lantern use script problem.
Red Offline
Posting Freak

Posts: 1,757
Threads: 49
Joined: Feb 2012
Reputation: 54
#11
RE: Lantern use script problem.

(11-03-2012, 04:30 PM)beecake Wrote: Oh! It isn't calling because you missed this: if(HasItem("lantern_1") == true)


That is my guess...
Let's see.
EDIT:your guess went wrong. Sorry mate.
(This post was last modified: 11-03-2012, 04:46 PM by Red.)
11-03-2012, 04:44 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#12
RE: Lantern use script problem.

Then i don't know... Instead of the callback, maybe use a timer that checks all the time if the players lantern is on

Trying is the first step to success.
11-03-2012, 04:49 PM
Find
Red Offline
Posting Freak

Posts: 1,757
Threads: 49
Joined: Feb 2012
Reputation: 54
#13
RE: Lantern use script problem.

(11-03-2012, 04:49 PM)beecake Wrote: Then i don't know... Instead of the callback, maybe use a timer that checks all the time if the players lantern is on
Okay.... what's the script that checks that?
(This post was last modified: 11-03-2012, 05:04 PM by Red.)
11-03-2012, 05:00 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#14
RE: Lantern use script problem.

AddTimer("Check", 0.1f, "CheckLantern"); //This should be called when you want to check if the lanterh is used. And it should only be called once

void CheckLantern(string &in asTimer)
{
if(GetLanternActive() == true)
{
//Do the stuff you want it to
}
AddTimer("Check", 0.1f, "CheckLantern"); //This makes it loop

}

Trying is the first step to success.
(This post was last modified: 11-03-2012, 05:25 PM by FlawlessHappiness.)
11-03-2012, 05:25 PM
Find
Red Offline
Posting Freak

Posts: 1,757
Threads: 49
Joined: Feb 2012
Reputation: 54
#15
RE: Lantern use script problem.

(11-03-2012, 05:25 PM)beecake Wrote: AddTimer("Check", 0.1f, "CheckLantern"); //This should be called when you want to check if the lanterh is used. And it should only be called once

void CheckLantern(string &in asTimer)
{
if(GetLanternActive() == true)
{
//Do the stuff you want it to
}
AddTimer("Check", 0.1f, "CheckLantern"); //This makes it loop

}
Darn, no hope, thanks still.
(This post was last modified: 11-03-2012, 05:50 PM by Red.)
11-03-2012, 05:48 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#16
RE: Lantern use script problem.

You say the sound work. But not the other stuff inside the script. This means: the script is calling.
But there is a problem with the 2 other lines:

{
for(int i; i<8; i++)SetPropActiveAndFade("slime_"+i,false,1.5);

PlayGuiSound("puzzle_acid",3);

FadeLightTo("PointLight_18", 0,0, 0, 0, 0, 3);
}
There must be a problem with the red lines

Trying is the first step to success.
(This post was last modified: 11-03-2012, 05:57 PM by FlawlessHappiness.)
11-03-2012, 05:51 PM
Find
Red Offline
Posting Freak

Posts: 1,757
Threads: 49
Joined: Feb 2012
Reputation: 54
#17
RE: Lantern use script problem.

(11-03-2012, 05:51 PM)beecake Wrote: You say the sound work. But not the other stuff inside the script. This means: the script is calling.
But there is a problem with the 2 other lines:

{
for(int i; i<8; i++)SetPropActiveAndFade("slime_"+i,false,1.5);

PlayGuiSound("puzzle_acid",3);

FadeLightTo("PointLight_18", 0,0, 0, 0, 0, 3);
}
There must be a problem with the red line
The light works, there's no problem there.
And the sound works even when the lantern is OFF.
EDIT: Okay i give up, i think different solution.
(This post was last modified: 11-03-2012, 06:03 PM by Red.)
11-03-2012, 05:54 PM
Find




Users browsing this thread: 1 Guest(s)