VeNoMzTeamHysterical
Member
Posts: 240
Threads: 36
Joined: Dec 2012
Reputation:
3
|
Help ;) solved!
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.
|
|
04-14-2013, 10:21 AM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Help ;)
What if you used this?
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.
Discord: Romulator#0001
(This post was last modified: 04-14-2013, 12:03 PM by Romulator.)
|
|
04-14-2013, 12:01 PM |
|
VeNoMzTeamHysterical
Member
Posts: 240
Threads: 36
Joined: Dec 2012
Reputation:
3
|
RE: Help ;)
(04-14-2013, 12:01 PM)ROMul8r Wrote: What if you used this?
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, 12:23 PM |
|
7heDubz
Posting Freak
Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation:
41
|
RE: Help ;)
(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 |
|
VeNoMzTeamHysterical
Member
Posts: 240
Threads: 36
Joined: Dec 2012
Reputation:
3
|
RE: Help ;)
(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:43 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Help ;)
(04-14-2013, 12:23 PM)VeNoMzTeamHysterical Wrote:
(04-14-2013, 12:01 PM)ROMul8r Wrote: What if you used this?
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
Discord: Romulator#0001
(This post was last modified: 04-14-2013, 01:01 PM by Romulator.)
|
|
04-14-2013, 12:53 PM |
|
VeNoMzTeamHysterical
Member
Posts: 240
Threads: 36
Joined: Dec 2012
Reputation:
3
|
RE: Help ;)
(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?
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
|
|
04-14-2013, 01:02 PM |
|
NaxEla
Senior Member
Posts: 415
Threads: 5
Joined: Dec 2012
Reputation:
28
|
RE: Help ;) Not solved!
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:
if(HasItem("lantern_1")) { TeleportPlayer("InCave"); } else { SetMessage("Messages", "NeedLantern", 0); }
|
|
04-14-2013, 10:07 PM |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
RE: Help ;) Not solved!
if (GetLanternActive()) == true) { SetEntityActive("block_box_1", false); }
"Veni, vidi, vici."
"I came, I saw, I conquered."
|
|
04-15-2013, 07:18 AM |
|
VeNoMzTeamHysterical
Member
Posts: 240
Threads: 36
Joined: Dec 2012
Reputation:
3
|
RE: Help ;) Not solved!
(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:
if(HasItem("lantern_1")) { TeleportPlayer("InCave"); } else { SetMessage("Messages", "NeedLantern", 0); }
Thanks allot
|
|
04-15-2013, 08:24 AM |
|
|