The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 Can't get Areas active
trollox Offline
Member

Posts: 215
Threads: 16
Joined: Dec 2011
Reputation: 3
#1
Can't get Areas active

Alright so the idea is to make the "player" walk through 3 areas.
1. makes the door active and blockes him off --done.
2. The first area set's the 2nd area active aswell as the door "no fatal erros , so i guess it works"
3. When he goes back and touches the 2nd area the player is suppose to make the 2nd door active and confuse the player so he thinks he's stuck. The 2nd script also activate the 3rd script "havn't scripted this part yet since the 2nd area dosen't get active.
4. When touching the 3rd area the 1st door dissapear and the player can contiune with the mod.

But for some reason the 1st script area don't activate the 2nd scripting area and that's my problem.
While i'm writing this helping requiest i also wonder how do i make the 1st door dissapear is it like making it active but the opposite so instead of : SetEntityActive("Door_1", true);
I change it to : SetEntityActive("Door_1", false); would that do it? I really need help i'm so confused.

Here's the full script if you need to read it :


void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Door", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_1", "Script", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "Door2", true, 1);
}

void Door(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Door_1", true);
}

void Door2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Door_2", true);
}

void Script(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("ScriptArea_2", true);
}














////////////////////////////
// Run when entering map
void OnEnter()
{
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
}
(This post was last modified: 02-04-2012, 05:59 PM by trollox.)
02-04-2012, 05:24 PM
Find


Messages In This Thread
Can't get Areas active - by trollox - 02-04-2012, 05:24 PM
RE: Can't get Areas active - by Elven - 02-04-2012, 09:49 PM
RE: Can't get Areas active - by trollox - 02-04-2012, 10:13 PM
RE: Can't get Areas active - by Elven - 02-04-2012, 10:14 PM
RE: Can't get Areas active - by vcplz - 02-04-2012, 10:26 PM



Users browsing this thread: 1 Guest(s)