Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 5 Vote(s) - 3.8 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting, need urgent help!
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#31
RE: Scripting, need urgent help!

I noticed 8, 9, and 10 go their tops cut off. 8 and 9 are the two .hps files for each of the maps. 10 is my extra_english.lang. Also it doesn't matter with 8 & 9, they both match.
Aye, that's my bad. o.o silly me. xD I'm doing the key pickup/trigger monster test right now.

Ba-da bing, ba-da boom.
(This post was last modified: 07-24-2011, 12:14 AM by JenniferOrange.)
07-24-2011, 12:02 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#32
RE: Scripting, need urgent help!

Same. Hmmm, because I am totally useless with scripting tho, not sure what I can do...

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

07-24-2011, 12:21 AM
Website Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#33
RE: Scripting, need urgent help!

Looking at your script again I've noticed OnEnter() is missing...
Also, this is what you've told your script to do:
Pick up upstairskey_1, activate monster_grunt & showenemyplayerposition, unlock leveltransferdoor_1 with upstairskey_1 and remove it from the inventory.
That seems to be wrong, since in the level editor leveltransferdoor_1 is the door you DON'T want a key to be used on. Therefore leveltransferdoor_1 should be changed to the name of the door in the other area, and the key script should be switched over to the other maps .hps file.
Also did you make sure the door the monster breaks down hasn't been checked as unbreakable?

Ba-da bing, ba-da boom.
07-24-2011, 12:22 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#34
RE: Scripting, need urgent help!

No, leveltransferdoor_1 is the door that needs to be unlocked. The door is also not checked as unbreakable.

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

07-24-2011, 12:36 AM
Website Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#35
RE: Scripting, need urgent help!

Me testing it:
http://www.youtube.com/watch?v=K9wKH5-TF2s
it works for me. This is the exact script I gave on the Wiki.

Ba-da bing, ba-da boom.
07-24-2011, 12:36 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#36
RE: Scripting, need urgent help!

D: Hmmm... What could I be doing wrong?!

The whole code:
void OnStart()
{
AddUseItemCallback("", "upstairskey_1", "leveltransferdoor_1", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("upstairskey_1", "OnPickup");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("leveltransferdoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "leveltransferdoor_1", 0, false);
RemoveItem("upstairskey_1");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("monster_grunt", true);
ShowEnemyPlayerPosition("monster_grunt");
}
void OnLeave ()
{

}

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

(This post was last modified: 07-24-2011, 12:51 AM by JetlinerX.)
07-24-2011, 12:49 AM
Website Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#37
RE: Scripting, need urgent help!

Did you say earlier when the key is picked up nothing shows? Like it just says 'Picked Up' although in your extra_english.lang file you've put something? I have that problem. x_x
Make sure you go back in the map and check if the brute's name matches. Check the key and door as well. You might've changed a name and forgotten to hit Enter so it stays.

Ba-da bing, ba-da boom.
(This post was last modified: 07-24-2011, 01:21 AM by JenniferOrange.)
07-24-2011, 01:20 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#38
RE: Scripting, need urgent help!

Oh crap! I totally didnt remember to chage the name!! Ill let you know, thanks SOOOO much for telling me that!

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

07-24-2011, 01:30 AM
Website Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#39
RE: Scripting, need urgent help!

Lol. Ah, simple mistakes ruin everything. xD

Ba-da bing, ba-da boom.
07-24-2011, 01:40 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#40
RE: Scripting, need urgent help!

Hm, I changed the name on the monster_grunt thing on the last 2 lines, is that all? If so, it didnt work... again... Sad

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

07-24-2011, 01:53 AM
Website Find




Users browsing this thread: 2 Guest(s)