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
New to this, having some trouble
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#21
RE: New to this, having some trouble

About problem 1 B : use this script SetPropActiveAndFade("SPIDERNAME", false, 0.5f);

And you can you give the screenshot from another angle ? In front of the ladder maybe ?

[Image: the-cabin-in-the-woods-masked-people.jpg]
02-28-2013, 11:56 AM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#22
RE: New to this, having some trouble

(02-28-2013, 11:54 AM)JustAnotherPlayer Wrote: Ahh. You used the mark “”. It should have been "".
Oh fack. You mean I've been stuck for the past 3 hours because whoever made the tutorial used the wrong kinda quotes? Fitting that my custom story involves wine because now I need a drink.

Maybe it wasn't their fault, perhaps it borked itself somewhere between copying it from the site and then sticking it into notepad. Oh well. Thank you kindly.

(02-28-2013, 11:56 AM)No Author Wrote: About problem 1 B : use this script SetPropActiveAndFade("SPIDERNAME", false, 0.5f);

And you can you give the screenshot from another angle ? In front of the ladder maybe ?

Thanks, that gave the effect I wanted. Oh and like I edited into my last post, I fixed the ladder issue by messing with it's dimensions a bunch.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
02-28-2013, 12:13 PM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#23
RE: New to this, having some trouble

(02-28-2013, 11:56 AM)DeAngelo Wrote: Oh and like I edited into my last post, I fixed the ladder issue by messing with it's dimensions a bunch.

Problem 2 or 3 ?

[Image: the-cabin-in-the-woods-masked-people.jpg]
(This post was last modified: 02-28-2013, 12:31 PM by No Author.)
02-28-2013, 12:30 PM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#24
RE: New to this, having some trouble

(02-28-2013, 12:30 PM)No Author Wrote:
(02-28-2013, 11:56 AM)DeAngelo Wrote: Oh and like I edited into my last post, I fixed the ladder issue by messing with it's dimensions a bunch.

Problem 2 or 3 ?

Problem 2, the one where the player kept moving forward. Problem 3 I fixed by rotating the hatch so now the player pushes it up to open it. As of now all of my problems are fixed. I just got done setting up a couple of other ladders in another area but I've been at this all night so I'm done for now. I'm hoping to have this completed by time the coming weekend is over, but who knows Smile

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
02-28-2013, 01:02 PM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#25
RE: New to this, having some trouble

Blargh, and today's session was going so well. I've made a lot of progress and I'm happy with the way things are looking. Alas, I have an issue. I have a room with 11 doors, each are fake. The player is going crazy at this part and I want each time he clicks on a door, it disappears, then once all of them are gone, a part of the floor disappears. I'm trying to use a variable script to do this but when I try to load the game I get a Unexpected End of File error. This is my first time dealing with variables so I'm probably doing something wrong. Here's my script. The stuff giving me issues is near the bottom, but I've included the whole script for completion sake.

PHP Code: (Select All)
void OnStart() 

    
AddEntityCollideCallback("Player""PlayerCollide""MonsterFunction"true1); 
    
AddEntityCollideCallback("Player""PlayerCollide_Spotlight""SpotlightOn"true1);
    
AddEntityCollideCallback("Player""PlayerCollide_SpotlightOff""SpotlightOff"true1);     
    
AddUseItemCallback("""Key_AlcDoor""AlcDoor""UsedKeyOnAlcDoor"true);    
    
AddEntityCollideCallback("SlantLadder""SlantLadderArea""ActivateLadder"true1);
    
SetEntityCallbackFunc("Cellar_Door_Key""OnPickupCellarKey");
    
AddEntityCollideCallback("Player""SkullLadder""MakeSkullLadder"true1);
    
AddEntityCollideCallback("Player""LookAtHatch""Lookey"true1); 
    
AddEntityCollideCallback("Player""TakenAlready""TookStuffAlready"true1); 
    
AddEntityCollideCallback("Player""IShouldTurnBack""TurnBack"true1); 
    
SetLocalVarInt("Var1"0);


void MonsterFunction(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_grunt_1"true); 
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_1"2"");
}

void UsedKeyOnAlcDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("AlcDoor"falsetrue);
    
PlaySoundAtEntity("""unlock_door.snt""AlcDoor"0.0ftrue);
    
RemoveItem("Key_AlcDoor");
}
void OnPickupCellarKey(string &in asEntitystring &in type)
{
    
SetEntityActive("CellarKeyDis_*",false);
    
SetEntityActive("CellarKeyApp_*",true);
    
SetEntityActive("TakenAlready",true);
}
void SpideyGoPoof(string &in asEntityint alState)
{
    if(
alState == 1//Only if the player is look at the area
{
    
GiveSanityDamage(5true);
    
AddTimer("Poof"1.0"Gone");
}

void Gone(string &in asTimer)
{
    
SetPropActiveAndFade("Spider_1"false0.5f);
}
void SpotlightOn(string &in asParentstring &in asChildint alState)
{
    
SetLightVisible("Spotlight_4"true); 
}
void SpotlightOff(string &in asParentstring &in asChildint alState)
{
    
SetLightVisible("Spotlight_4"false);
}

void DoorLocked(string &in asEntity)
{
if(
GetSwingDoorLocked("AlcDoor") == true)
{
SetMessage("Messages""AlLocked"0);
}
}
void NotNow(string &in asEntity)
{
if(
GetSwingDoorLocked("hatch_ceiling_1") == true)
{
SetMessage("Messages""NotNow"0);
}
}

void ActivateLadder (string &in asParentstring &in asChildint alState)
{
SetEntityActive("ladder_static_8"true);
SetEntityActive("SlantLadder"false);
SetEntityActive("LadderArea_2"true);
}
void MakeSkullLadder (string &in asParentstring &in asChildint alState)
{
SetEntityActive("human_skull_*"true);
SetEntityActive("Sladder_*"false);
GiveSanityDamage(5true);
AddTimer("SkullLadderTimer"4.0"SkullLadderEnd");
}
void SkullLadderEnd (string &in asTimer)
{
SetPropActiveAndFade("human_skull_*"false0.5f);
SetEntityActive("Sladder_*"true);
}
void TakeWine(string &in asEntity)
{
SetMessage("Messages""WineTaken"0);
SetSwingDoorLocked("CellarDoor"truetrue);
}

void CellarDoorLockedWhy(string &in asEntity)
{
if(
GetSwingDoorLocked("CellarDoor") == true)
{
SetMessage("Messages""WhyDoorLocked"0);
SetSwingDoorLocked("hatch_ceiling_1"falsetrue);
SetEntityActive("wood_box02_4"false);
SetEntityActive("LookAtHatch"true);
}
}
void Lookey (string &in asParentstring &in asChildint alState)
{
SetPlayerActive(false);
StartPlayerLookAt("hatch_ceiling_1"1.0f1.0f"");
SetMessage("Messages""IsKeyThere"0);
AddTimer("DoneLooking"2.0"DoneLookingAtHatch");
}
void DoneLookingAtHatch(string &in asTimer)
{
SetPlayerActive(true);
StopPlayerLookAt();
}
void TookStuffAlready(string &in asParentstring &in asChildint alState)
{
SetMessage("Messages""PickedUpAlready"0);
}
void TurnBack(string &in asParentstring &in asChildint alState)
{
SetMessage("Messages""WhereamI"0);
SetEntityActive ("WhatThe"true);
SetEntityActive ("TurnBack"true);
}
void WallHasAppeared(string &in asEntityint alState)
{
    if(
alState == 1//Only if the player is look at the area
{
    
GiveSanityDamage(5true);
    
SetMessage("Messages""WhatThe"0);
}
}
void CDoor1(string &in asEntity)
{
SetEntityActive("DoorRoomApp1_*"true);
SetEntityActive("DoorRoomDis1_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor2(string &in asEntity)
{
SetEntityActive("DoorRoomApp2_*"true);
SetEntityActive("DoorRoomDis2_*"false);
AddLocalVarInt("Var1"1);
func12();
void CDoor3(string &in asEntity)
{
SetEntityActive("DoorRoomApp3_*"true);
SetEntityActive("DoorRoomDis3_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor4(string &in asEntity)
{
SetEntityActive("DoorRoomApp4_*"true);
SetEntityActive("DoorRoomDis4_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor5(string &in asEntity)
{
SetEntityActive("DoorRoomApp5_*"true);
SetEntityActive("DoorRoomDis5_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor6(string &in asEntity)
{
SetEntityActive("DoorRoomApp6_*"true);
SetEntityActive("DoorRoomDis6_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor7(string &in asEntity)
{
SetEntityActive("DoorRoomApp7_*"true);
SetEntityActive("DoorRoomDis7_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor8(string &in asEntity)
{
SetEntityActive("DoorRoomApp8_*"true);
SetEntityActive("DoorRoomDis8_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor9(string &in asEntity)
{
SetEntityActive("DoorRoomApp9_*"true);
SetEntityActive("DoorRoomDis9_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor10(string &in asEntity)
{
SetEntityActive("DoorRoomApp10_*"true);
SetEntityActive("DoorRoomDis10_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor11(string &in asEntity)
{
SetEntityActive("DoorRoomApp11_*"true);
SetEntityActive("DoorRoomDis11_*"false);
AddLocalVarInt("Var1"1);
func12();

void func12(string &in asEntity)
{
if(
GetLocalVarInt("Var1") == 11)
    {
    
SetEntityActive("CRoomCarpet"false);
    }
}
void OnLeave()
{


A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
03-01-2013, 02:29 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#26
RE: New to this, having some trouble

(03-01-2013, 02:29 PM)DeAngelo Wrote: Blargh, and today's session was going so well. I've made a lot of progress and I'm happy with the way things are looking. Alas, I have an issue. I have a room with 11 doors, each are fake. The player is going crazy at this part and I want each time he clicks on a door, it disappears, then once all of them are gone, a part of the floor disappears. I'm trying to use a variable script to do this but when I try to load the game I get a Unexpected End of File error. This is my first time dealing with variables so I'm probably doing something wrong. Here's my script. The stuff giving me issues is near the bottom, but I've included the whole script for completion sake.

PHP Code: (Select All)
void OnStart() 

    
AddEntityCollideCallback("Player""PlayerCollide""MonsterFunction"true1); 
    
AddEntityCollideCallback("Player""PlayerCollide_Spotlight""SpotlightOn"true1);
    
AddEntityCollideCallback("Player""PlayerCollide_SpotlightOff""SpotlightOff"true1);     
    
AddUseItemCallback("""Key_AlcDoor""AlcDoor""UsedKeyOnAlcDoor"true);    
    
AddEntityCollideCallback("SlantLadder""SlantLadderArea""ActivateLadder"true1);
    
SetEntityCallbackFunc("Cellar_Door_Key""OnPickupCellarKey");
    
AddEntityCollideCallback("Player""SkullLadder""MakeSkullLadder"true1);
    
AddEntityCollideCallback("Player""LookAtHatch""Lookey"true1); 
    
AddEntityCollideCallback("Player""TakenAlready""TookStuffAlready"true1); 
    
AddEntityCollideCallback("Player""IShouldTurnBack""TurnBack"true1); 
    
SetLocalVarInt("Var1"0);


void MonsterFunction(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_grunt_1"true); 
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_1"2"");
}

void UsedKeyOnAlcDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("AlcDoor"falsetrue);
    
PlaySoundAtEntity("""unlock_door.snt""AlcDoor"0.0ftrue);
    
RemoveItem("Key_AlcDoor");
}
void OnPickupCellarKey(string &in asEntitystring &in type)
{
    
SetEntityActive("CellarKeyDis_*",false);
    
SetEntityActive("CellarKeyApp_*",true);
    
SetEntityActive("TakenAlready",true);
}
void SpideyGoPoof(string &in asEntityint alState)
{
    if(
alState == 1//Only if the player is look at the area
{
    
GiveSanityDamage(5true);
    
AddTimer("Poof"1.0"Gone");
}

void Gone(string &in asTimer)
{
    
SetPropActiveAndFade("Spider_1"false0.5f);
}
void SpotlightOn(string &in asParentstring &in asChildint alState)
{
    
SetLightVisible("Spotlight_4"true); 
}
void SpotlightOff(string &in asParentstring &in asChildint alState)
{
    
SetLightVisible("Spotlight_4"false);
}

void DoorLocked(string &in asEntity)
{
if(
GetSwingDoorLocked("AlcDoor") == true)
{
SetMessage("Messages""AlLocked"0);
}
}
void NotNow(string &in asEntity)
{
if(
GetSwingDoorLocked("hatch_ceiling_1") == true)
{
SetMessage("Messages""NotNow"0);
}
}

void ActivateLadder (string &in asParentstring &in asChildint alState)
{
SetEntityActive("ladder_static_8"true);
SetEntityActive("SlantLadder"false);
SetEntityActive("LadderArea_2"true);
}
void MakeSkullLadder (string &in asParentstring &in asChildint alState)
{
SetEntityActive("human_skull_*"true);
SetEntityActive("Sladder_*"false);
GiveSanityDamage(5true);
AddTimer("SkullLadderTimer"4.0"SkullLadderEnd");
}
void SkullLadderEnd (string &in asTimer)
{
SetPropActiveAndFade("human_skull_*"false0.5f);
SetEntityActive("Sladder_*"true);
}
void TakeWine(string &in asEntity)
{
SetMessage("Messages""WineTaken"0);
SetSwingDoorLocked("CellarDoor"truetrue);
}

void CellarDoorLockedWhy(string &in asEntity)
{
if(
GetSwingDoorLocked("CellarDoor") == true)
{
SetMessage("Messages""WhyDoorLocked"0);
SetSwingDoorLocked("hatch_ceiling_1"falsetrue);
SetEntityActive("wood_box02_4"false);
SetEntityActive("LookAtHatch"true);
}
}
void Lookey (string &in asParentstring &in asChildint alState)
{
SetPlayerActive(false);
StartPlayerLookAt("hatch_ceiling_1"1.0f1.0f"");
SetMessage("Messages""IsKeyThere"0);
AddTimer("DoneLooking"2.0"DoneLookingAtHatch");
}
void DoneLookingAtHatch(string &in asTimer)
{
SetPlayerActive(true);
StopPlayerLookAt();
}
void TookStuffAlready(string &in asParentstring &in asChildint alState)
{
SetMessage("Messages""PickedUpAlready"0);
}
void TurnBack(string &in asParentstring &in asChildint alState)
{
SetMessage("Messages""WhereamI"0);
SetEntityActive ("WhatThe"true);
SetEntityActive ("TurnBack"true);
}
void WallHasAppeared(string &in asEntityint alState)
{
    if(
alState == 1//Only if the player is look at the area
{
    
GiveSanityDamage(5true);
    
SetMessage("Messages""WhatThe"0);
}
}
void CDoor1(string &in asEntity)
{
SetEntityActive("DoorRoomApp1_*"true);
SetEntityActive("DoorRoomDis1_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor2(string &in asEntity)
{
SetEntityActive("DoorRoomApp2_*"true);
SetEntityActive("DoorRoomDis2_*"false);
AddLocalVarInt("Var1"1);
func12();
//This one. You forgot a closing brace
void CDoor3(string &in asEntity)
{
SetEntityActive("DoorRoomApp3_*"true);
SetEntityActive("DoorRoomDis3_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor4(string &in asEntity)
{
SetEntityActive("DoorRoomApp4_*"true);
SetEntityActive("DoorRoomDis4_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor5(string &in asEntity)
{
SetEntityActive("DoorRoomApp5_*"true);
SetEntityActive("DoorRoomDis5_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor6(string &in asEntity)
{
SetEntityActive("DoorRoomApp6_*"true);
SetEntityActive("DoorRoomDis6_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor7(string &in asEntity)
{
SetEntityActive("DoorRoomApp7_*"true);
SetEntityActive("DoorRoomDis7_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor8(string &in asEntity)
{
SetEntityActive("DoorRoomApp8_*"true);
SetEntityActive("DoorRoomDis8_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor9(string &in asEntity)
{
SetEntityActive("DoorRoomApp9_*"true);
SetEntityActive("DoorRoomDis9_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor10(string &in asEntity)
{
SetEntityActive("DoorRoomApp10_*"true);
SetEntityActive("DoorRoomDis10_*"false);
AddLocalVarInt("Var1"1);
func12();
}
void CDoor11(string &in asEntity)
{
SetEntityActive("DoorRoomApp11_*"true);
SetEntityActive("DoorRoomDis11_*"false);
AddLocalVarInt("Var1"1);
func12();

void func12(string &in asEntity)
{
if(
GetLocalVarInt("Var1") == 11)
    {
    
SetEntityActive("CRoomCarpet"false);
    }
}
void OnLeave()
{

Remove the void OnLeave() thing. The error just said "Unexpected End of File!" with no explanation of what line, or any digits over at that line?

EDIT: It is found, look at the script.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 03-01-2013, 02:33 PM by PutraenusAlivius.)
03-01-2013, 02:32 PM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#27
RE: New to this, having some trouble

(03-01-2013, 02:32 PM)JustAnotherPlayer Wrote: Remove the void OnLeave() thing. The error just said "Unexpected End of File!" with no explanation of what line, or any digits over at that line?

EDIT: It is found, look at the script.

Thank you! It's working perfect. I tell ya, I swear I looked over that damn thing 20 times and didn't find any mistakes. I guess that's what operating on 3 hours of sleep does to me.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
03-01-2013, 02:42 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#28
RE: New to this, having some trouble

(03-01-2013, 02:42 PM)DeAngelo Wrote:
(03-01-2013, 02:32 PM)JustAnotherPlayer Wrote: Remove the void OnLeave() thing. The error just said "Unexpected End of File!" with no explanation of what line, or any digits over at that line?

EDIT: It is found, look at the script.

Thank you! It's working perfect. I tell ya, I swear I looked over that damn thing 20 times and didn't find any mistakes. I guess that's what operating on 3 hours of sleep does to me.

How i did it:
Re-read closely with this song playing on the background and drinking hot chocolate milk.
Song:
http://www.youtube.com/watch?v=jsbF2Inokxs

EDIT: NEVER EVER DID THE SAME MISTAKES I DID.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 03-01-2013, 02:47 PM by PutraenusAlivius.)
03-01-2013, 02:43 PM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#29
RE: New to this, having some trouble

New day, new problem. Well, this one isn't that major. I'm just trying to figure out how to make a rope. I already have the ladder area in position and the sound set to "rope" but I dunno how to make the actual rope. I found the "rope" area but don't understand it. Every tutorial I find seems to be geared towards people wanting movable ropes that attach to stuff. I don't want my rope to move, just hang there and let the player climb up it.

I feel bad constantly asking for help, but the improvements I've made on my skill level with this editor in only 2 weeks is making me happy. Going into this I knew literally nothing about coding, scripts, or anything else. Earlier tonight I typed from scratch a 10 line piece of code to make a few things happen, sure it'd give me an error and I'd have to find a tutorial on what I was trying to do. When the code actually worked I almost cried.

EDIT: Nevermind, I didn't know I had to actually attach the ends to an object in the game. I used those invisible boxes and now my rope is there all being ropey Smile

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
(This post was last modified: 03-02-2013, 09:03 AM by DeAngelo.)
03-02-2013, 08:36 AM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#30
RE: New to this, having some trouble

I think I found it.

[Image: the-cabin-in-the-woods-masked-people.jpg]
(This post was last modified: 03-02-2013, 09:06 AM by No Author.)
03-02-2013, 09:05 AM
Find




Users browsing this thread: 1 Guest(s)