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 HELP - Climb Function (If)
Fanskapi Offline
Junior Member

Posts: 23
Threads: 5
Joined: Nov 2011
Reputation: 0
#1
HELP - Climb Function (If)

Sorry for being an (almost) complete noob...But what the hell is wrong with...


GetSwingDoorLocked("Door1");
if(GetSwingDoorLocked("Door1") == false) {
SetEntityActive("LadderFunc", true);
}

Im trying to make so when i unlock a hatch (Door1 is actually a hatch), it will activate a "climb" function (that is unactivated, atleast in the map editor) , or rather the Ladder Area thingy. I don't want it to be active all the time because then i would be able to just glitch thru it. I've been trying to solve this a bit over 1½ hours.

(Don't laugh at my newb script/programming skills) Smile


Full script for the map:
void OnStart() {

AddUseItemCallback("", "Key1", "Door1", "DoorOne", true);
AddUseItemCallback("", "Key2", "Door2", "DoorTwo", true);
GetSwingDoorLocked("Door1");
if(GetSwingDoorLocked("Door1") == false) {
SetEntityActive("LadderFunc", true);
}
}

void DoorOne(string &in asItem, string &in asEntity) {    
SetSwingDoorLocked("Door1", false, true);    
PlaySoundAtEntity("", "unlock_door", "Door", 0, false);    
RemoveItem("Key1");                          
}

void DoorTwo(string &in asItem, string &in asEntity){    
SetSwingDoorLocked("Door2", false, true);    
PlaySoundAtEntity("", "unlock_door", "Door2", 0, false);    
RemoveItem("Key2");                          
}

EDIT: Formatted the text :S
(This post was last modified: 11-24-2011, 11:04 PM by Fanskapi.)
11-24-2011, 09:24 PM
Find


Messages In This Thread
HELP - Climb Function (If) - by Fanskapi - 11-24-2011, 09:24 PM
RE: HELP - Climb Function (If) - by Fanskapi - 11-24-2011, 10:30 PM
RE: HELP - Climb Function (If) - by MrBigzy - 11-24-2011, 10:43 PM
RE: HELP - Climb Function (If) - by Fanskapi - 11-24-2011, 11:03 PM
RE: HELP - Climb Function (If) - by Your Computer - 11-24-2011, 11:14 PM
RE: HELP - Climb Function (If) - by Fanskapi - 11-25-2011, 07:05 PM



Users browsing this thread: 1 Guest(s)