Frictional Games Forum (read-only)
Help ;) solved! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Help ;) solved! (/thread-21165.html)

Pages: 1 2


Help ;) solved! - VeNoMzTeamHysterical - 04-14-2013

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 Wink

Also i need voice actors,
Female voice
2 Male voices.

Already thanks for helping.


RE: Help ;) - Romulator - 04-14-2013

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.


RE: Help ;) - VeNoMzTeamHysterical - 04-14-2013


(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)


RE: Help ;) - 7heDubz - 04-14-2013

(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 Smile


RE: Help ;) - VeNoMzTeamHysterical - 04-14-2013

(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 Smile
Hahaha you can do a female voice ur kidding me ;D
Add me on skype so we can get contact and shizzle Wink

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 Smile
Hahaha you can do a female voice ur kidding me ;D
Add me on skype so we can get contact and shizzle Wink

Skype: venomzvidsyoutube


RE: Help ;) - Romulator - 04-14-2013

(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 Tongue http://wiki.frictionalgames.com/hpl2/amnesia/script_functions?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


RE: Help ;) - VeNoMzTeamHysterical - 04-14-2013

(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 Tongue http://wiki.frictionalgames.com/hpl2/amnesia/script_functions?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


RE: Help ;) Not solved! - NaxEla - 04-14-2013

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);




RE: Help ;) Not solved! - PutraenusAlivius - 04-15-2013

PHP Code:
if (GetLanternActive()) == true)
{
SetEntityActive("block_box_1"false);




RE: Help ;) Not solved! - VeNoMzTeamHysterical - 04-15-2013

(04-14-2013, 10:07 PM)NaxEla Wrote: 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);

Thanks allot Wink