No Author
Posting Freak
Posts: 962
Threads: 10
Joined: Jun 2012
Reputation:
13
|
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 ?
|
|
02-28-2013, 11:56 AM |
|
DeAngelo
Senior Member
Posts: 263
Threads: 26
Joined: Feb 2013
Reputation:
11
|
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.
|
|
02-28-2013, 12:13 PM |
|
No Author
Posting Freak
Posts: 962
Threads: 10
Joined: Jun 2012
Reputation:
13
|
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 ?
(This post was last modified: 02-28-2013, 12:31 PM by No Author.)
|
|
02-28-2013, 12:30 PM |
|
DeAngelo
Senior Member
Posts: 263
Threads: 26
Joined: Feb 2013
Reputation:
11
|
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
|
|
02-28-2013, 01:02 PM |
|
DeAngelo
Senior Member
Posts: 263
Threads: 26
Joined: Feb 2013
Reputation:
11
|
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.
void OnStart() { AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); AddEntityCollideCallback("Player", "PlayerCollide_Spotlight", "SpotlightOn", true, 1); AddEntityCollideCallback("Player", "PlayerCollide_SpotlightOff", "SpotlightOff", true, 1); AddUseItemCallback("", "Key_AlcDoor", "AlcDoor", "UsedKeyOnAlcDoor", true); AddEntityCollideCallback("SlantLadder", "SlantLadderArea", "ActivateLadder", true, 1); SetEntityCallbackFunc("Cellar_Door_Key", "OnPickupCellarKey"); AddEntityCollideCallback("Player", "SkullLadder", "MakeSkullLadder", true, 1); AddEntityCollideCallback("Player", "LookAtHatch", "Lookey", true, 1); AddEntityCollideCallback("Player", "TakenAlready", "TookStuffAlready", true, 1); AddEntityCollideCallback("Player", "IShouldTurnBack", "TurnBack", true, 1); SetLocalVarInt("Var1", 0); }
void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, ""); }
void UsedKeyOnAlcDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("AlcDoor", false, true); PlaySoundAtEntity("", "unlock_door.snt", "AlcDoor", 0.0f, true); RemoveItem("Key_AlcDoor"); } void OnPickupCellarKey(string &in asEntity, string &in type) { SetEntityActive("CellarKeyDis_*",false); SetEntityActive("CellarKeyApp_*",true); SetEntityActive("TakenAlready",true); } void SpideyGoPoof(string &in asEntity, int alState) { if(alState == 1) //Only if the player is look at the area { GiveSanityDamage(5, true); AddTimer("Poof", 1.0, "Gone"); } } void Gone(string &in asTimer) { SetPropActiveAndFade("Spider_1", false, 0.5f); } void SpotlightOn(string &in asParent, string &in asChild, int alState) { SetLightVisible("Spotlight_4", true); } void SpotlightOff(string &in asParent, string &in asChild, int 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 asParent, string &in asChild, int alState) { SetEntityActive("ladder_static_8", true); SetEntityActive("SlantLadder", false); SetEntityActive("LadderArea_2", true); } void MakeSkullLadder (string &in asParent, string &in asChild, int alState) { SetEntityActive("human_skull_*", true); SetEntityActive("Sladder_*", false); GiveSanityDamage(5, true); AddTimer("SkullLadderTimer", 4.0, "SkullLadderEnd"); } void SkullLadderEnd (string &in asTimer) { SetPropActiveAndFade("human_skull_*", false, 0.5f); SetEntityActive("Sladder_*", true); } void TakeWine(string &in asEntity) { SetMessage("Messages", "WineTaken", 0); SetSwingDoorLocked("CellarDoor", true, true); }
void CellarDoorLockedWhy(string &in asEntity) { if(GetSwingDoorLocked("CellarDoor") == true) { SetMessage("Messages", "WhyDoorLocked", 0); SetSwingDoorLocked("hatch_ceiling_1", false, true); SetEntityActive("wood_box02_4", false); SetEntityActive("LookAtHatch", true); } } void Lookey (string &in asParent, string &in asChild, int alState) { SetPlayerActive(false); StartPlayerLookAt("hatch_ceiling_1", 1.0f, 1.0f, ""); SetMessage("Messages", "IsKeyThere", 0); AddTimer("DoneLooking", 2.0, "DoneLookingAtHatch"); } void DoneLookingAtHatch(string &in asTimer) { SetPlayerActive(true); StopPlayerLookAt(); } void TookStuffAlready(string &in asParent, string &in asChild, int alState) { SetMessage("Messages", "PickedUpAlready", 0); } void TurnBack(string &in asParent, string &in asChild, int alState) { SetMessage("Messages", "WhereamI", 0); SetEntityActive ("WhatThe", true); SetEntityActive ("TurnBack", true); } void WallHasAppeared(string &in asEntity, int alState) { if(alState == 1) //Only if the player is look at the area { GiveSanityDamage(5, true); 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() { }
|
|
03-01-2013, 02:29 PM |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
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.
void OnStart() { AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); AddEntityCollideCallback("Player", "PlayerCollide_Spotlight", "SpotlightOn", true, 1); AddEntityCollideCallback("Player", "PlayerCollide_SpotlightOff", "SpotlightOff", true, 1); AddUseItemCallback("", "Key_AlcDoor", "AlcDoor", "UsedKeyOnAlcDoor", true); AddEntityCollideCallback("SlantLadder", "SlantLadderArea", "ActivateLadder", true, 1); SetEntityCallbackFunc("Cellar_Door_Key", "OnPickupCellarKey"); AddEntityCollideCallback("Player", "SkullLadder", "MakeSkullLadder", true, 1); AddEntityCollideCallback("Player", "LookAtHatch", "Lookey", true, 1); AddEntityCollideCallback("Player", "TakenAlready", "TookStuffAlready", true, 1); AddEntityCollideCallback("Player", "IShouldTurnBack", "TurnBack", true, 1); SetLocalVarInt("Var1", 0); }
void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, ""); }
void UsedKeyOnAlcDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("AlcDoor", false, true); PlaySoundAtEntity("", "unlock_door.snt", "AlcDoor", 0.0f, true); RemoveItem("Key_AlcDoor"); } void OnPickupCellarKey(string &in asEntity, string &in type) { SetEntityActive("CellarKeyDis_*",false); SetEntityActive("CellarKeyApp_*",true); SetEntityActive("TakenAlready",true); } void SpideyGoPoof(string &in asEntity, int alState) { if(alState == 1) //Only if the player is look at the area { GiveSanityDamage(5, true); AddTimer("Poof", 1.0, "Gone"); } } void Gone(string &in asTimer) { SetPropActiveAndFade("Spider_1", false, 0.5f); } void SpotlightOn(string &in asParent, string &in asChild, int alState) { SetLightVisible("Spotlight_4", true); } void SpotlightOff(string &in asParent, string &in asChild, int 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 asParent, string &in asChild, int alState) { SetEntityActive("ladder_static_8", true); SetEntityActive("SlantLadder", false); SetEntityActive("LadderArea_2", true); } void MakeSkullLadder (string &in asParent, string &in asChild, int alState) { SetEntityActive("human_skull_*", true); SetEntityActive("Sladder_*", false); GiveSanityDamage(5, true); AddTimer("SkullLadderTimer", 4.0, "SkullLadderEnd"); } void SkullLadderEnd (string &in asTimer) { SetPropActiveAndFade("human_skull_*", false, 0.5f); SetEntityActive("Sladder_*", true); } void TakeWine(string &in asEntity) { SetMessage("Messages", "WineTaken", 0); SetSwingDoorLocked("CellarDoor", true, true); }
void CellarDoorLockedWhy(string &in asEntity) { if(GetSwingDoorLocked("CellarDoor") == true) { SetMessage("Messages", "WhyDoorLocked", 0); SetSwingDoorLocked("hatch_ceiling_1", false, true); SetEntityActive("wood_box02_4", false); SetEntityActive("LookAtHatch", true); } } void Lookey (string &in asParent, string &in asChild, int alState) { SetPlayerActive(false); StartPlayerLookAt("hatch_ceiling_1", 1.0f, 1.0f, ""); SetMessage("Messages", "IsKeyThere", 0); AddTimer("DoneLooking", 2.0, "DoneLookingAtHatch"); } void DoneLookingAtHatch(string &in asTimer) { SetPlayerActive(true); StopPlayerLookAt(); } void TookStuffAlready(string &in asParent, string &in asChild, int alState) { SetMessage("Messages", "PickedUpAlready", 0); } void TurnBack(string &in asParent, string &in asChild, int alState) { SetMessage("Messages", "WhereamI", 0); SetEntityActive ("WhatThe", true); SetEntityActive ("TurnBack", true); } void WallHasAppeared(string &in asEntity, int alState) { if(alState == 1) //Only if the player is look at the area { GiveSanityDamage(5, true); 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."
|
|
03-01-2013, 02:32 PM |
|
DeAngelo
Senior Member
Posts: 263
Threads: 26
Joined: Feb 2013
Reputation:
11
|
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.
|
|
03-01-2013, 02:42 PM |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
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."
|
|
03-01-2013, 02:43 PM |
|
DeAngelo
Senior Member
Posts: 263
Threads: 26
Joined: Feb 2013
Reputation:
11
|
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
(This post was last modified: 03-02-2013, 09:03 AM by DeAngelo.)
|
|
03-02-2013, 08:36 AM |
|
No Author
Posting Freak
Posts: 962
Threads: 10
Joined: Jun 2012
Reputation:
13
|
RE: New to this, having some trouble
(This post was last modified: 03-02-2013, 09:06 AM by No Author.)
|
|
03-02-2013, 09:05 AM |
|
|