Well NaxEla helped me on my last script i wanna do a little bit the same.
But now if you try to enter a cave it says i need a lightning source first.
If you have to lantern you teleport into the cave.
I think i need GetLocalVarInt for it.
But i still dont really understand what it means.
I checked on youtube for tutorials and i could not find it.
if(GetLocalVarInt
If anyone knows a tutorial or can explain it would be great since i don't want to ask to much to you guys, maybe you even get annoyed of me then.
But as you guys know i am pretty easy at giving rep.
If you help me you get rewarded that's just how it is
Also i need voice actors,
Female voice
2 Male voices.
Already thanks for helping.
What if you used this?
Code:
OnStart()
{
SetLanternLitCallback("AllowEntrance");
SetLanternLitCallback("DisallowEntrance");
}
void AllowEntrance(true)
{
SetEntityActive("block_box_1", false);
}
void AllowEntrance(false)
{
SetEntityActive("block_box_1", true);
}
It's pretty nooby code, and not exactly what you wanted, but I think it would work. Basically it allows you to enter the cave if you have your lantern currently on. It would be an idea to also put in a ScriptArea after which lets you go to the next level. You just need a block box stopping you from going into the cave named block_box_1.
(04-14-2013, 12:01 PM)ROMul8r Wrote: [ -> ]What if you used this?
Code:
OnStart()
{
SetLanternLitCallback("AllowEntrance");
SetLanternLitCallback("DisallowEntrance");
}
void AllowEntrance(true)
{
SetEntityActive("block_box_1", false);
}
void AllowEntrance(false)
{
SetEntityActive("block_box_1", true);
}
It's pretty nooby code, and not exactly what you wanted, but I think it would work. Basically it allows you to enter the cave if you have your lantern currently on. It would be an idea to also put in a ScriptArea after which lets you go to the next level. You just need a block box stopping you from going into the cave named block_box_1.
I get 2 errors when i try'd it it says ERR : Expected Data Type
off . void AllowEntrance(false) and void AllowEntrance(true)
(04-14-2013, 10:21 AM)VeNoMzTeamHysterical Wrote: [ -> ]Also i need voice actors,
Female voice
2 Male voices.
Already thanks for helping.
Give me something i can read (PM) and ill read it, upload to youtube and link you
(04-14-2013, 12:42 PM)WIWWM Wrote: [ -> ] (04-14-2013, 10:21 AM)VeNoMzTeamHysterical Wrote: [ -> ]Also i need voice actors,
Female voice
2 Male voices.
Already thanks for helping.
Give me something i can read (PM) and ill read it, upload to youtube and link you
Hahaha you can do a female voice ur kidding me ;D
Add me on skype so we can get contact and shizzle
Skype: venomzvidsyoutube
(04-14-2013, 12:42 PM)WIWWM Wrote: [ -> ] (04-14-2013, 10:21 AM)VeNoMzTeamHysterical Wrote: [ -> ]Also i need voice actors,
Female voice
2 Male voices.
Already thanks for helping.
Give me something i can read (PM) and ill read it, upload to youtube and link you
Hahaha you can do a female voice ur kidding me ;D
Add me on skype so we can get contact and shizzle
Skype: venomzvidsyoutube
(04-14-2013, 12:23 PM)VeNoMzTeamHysterical Wrote: [ -> ]
(04-14-2013, 12:01 PM)ROMul8r Wrote: [ -> ]What if you used this?
Code:
OnStart()
{
SetLanternLitCallback("AllowEntrance");
SetLanternLitCallback("DisallowEntrance");
}
void AllowEntrance(true)
{
SetEntityActive("block_box_1", false);
}
void AllowEntrance(false)
{
SetEntityActive("block_box_1", true);
}
It's pretty nooby code, and not exactly what you wanted, but I think it would work. Basically it allows you to enter the cave if you have your lantern currently on. It would be an idea to also put in a ScriptArea after which lets you go to the next level. You just need a block box stopping you from going into the cave named block_box_1.
I get 2 errors when i try'd it it says ERR : Expected Data Type
off . void AllowEntrance(false) and void AllowEntrance(true)
Oh lol, then I can't help much, I was just going by the wiki
http://wiki.frictionalgames.com/hpl2/amn...unctions?s
If you just do "Ctrl+F" and look for Lantern, you can find a few lines of stuff there and you might be able to manipulate one of the for your code
==EDIT==
Now that I think about it, it could actually be for an if statement, but I have no idea how to use those, but someone like JustAnotherPlayer will come along and correct me xD
(04-14-2013, 12:53 PM)ROMul8r Wrote: [ -> ] (04-14-2013, 12:23 PM)VeNoMzTeamHysterical Wrote: [ -> ]
(04-14-2013, 12:01 PM)ROMul8r Wrote: [ -> ]What if you used this?
Code:
OnStart()
{
SetLanternLitCallback("AllowEntrance");
SetLanternLitCallback("DisallowEntrance");
}
void AllowEntrance(true)
{
SetEntityActive("block_box_1", false);
}
void AllowEntrance(false)
{
SetEntityActive("block_box_1", true);
}
It's pretty nooby code, and not exactly what you wanted, but I think it would work. Basically it allows you to enter the cave if you have your lantern currently on. It would be an idea to also put in a ScriptArea after which lets you go to the next level. You just need a block box stopping you from going into the cave named block_box_1.
I get 2 errors when i try'd it it says ERR : Expected Data Type
off . void AllowEntrance(false) and void AllowEntrance(true)
Oh lol, then I can't help much, I was just going by the wiki http://wiki.frictionalgames.com/hpl2/amn...unctions?s
If you just do "Ctrl+F" and look for Lantern, you can find a few lines of stuff there and you might be able to manipulate one of the for your code
==EDIT==
Now that I think about it, it could actually be for an if statement, but I have no idea how to use those, but someone like JustAnotherPlayer will come along and correct me xD
Hahaha yeah he is a pro in this ;P
Before they enter the cave, you can use an if statement to check if they have the lantern item by using
HasItem(string& asName). You can add something like this into your code:
PHP Code:
if(HasItem("lantern_1")) {
TeleportPlayer("InCave");
}
else {
SetMessage("Messages", "NeedLantern", 0);
}