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
DeAngelo Offline
Senior Member

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

(02-28-2013, 11:23 AM)No Author Wrote: Problem 3 : The hatch CAN'T be placed like that. It's just gonna do... that. Rotate the hatch.

I'll be back with more solutions.

I realized about 2 minutes ago that my hatch was swinging open even though it was locked. Now I know why. I've rotated it.


(02-28-2013, 11:28 AM)Adrianis Wrote: Ok...

Firstly the light thing, for future reference. From what I can tell it sounds like the same prob I had a while ago - I couldn't turn lights on because I had de-activated them initially in the map editor. Is this what you had done as well? If so, what you can do is set it to active again in the editor, then in OnStart/OnEnter you set the light visible to false, then true when you want it to turn on.

1 - GiveSanityDamage(float afAmount, bool abUseEffect);
That function has some screen stuff built in, the sudden narrowing effect that happens during scary events in TDD. There are also a whole bunch of effects under the 'Screen Effects' section of the engine script wiki page

3 - You might be able to use SetPropStaticPhysics(string& asName, bool abX); to make the hatch hang, but if it needs to swing open you might have to do some tweeking to get the timing right

No idea about 2, sorry Smile

It doesn't seem to matter what I set the light to, they just can't seem to be changed while playing. My solution fixed it for now though so it's all good.




OK, I have a new issue. I knew when I opened my damn mouth about not having issues with my lang file I'd start having one right away. I'm trying to get a message to appear when I click on a locked door. I followed the tutorial on the wiki to the letter but the door still doesn't pop up any message. My door is named AlcDoor and in the Entity tab I have DoorLocked in the PlayerInteractCallback box, and the auto remove box checked. Here are my lang and script files.

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);    
    
SetEntityCallbackFunc("Cellar_Door_Key""OnPickupCellarKey");


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);
}
void SpideyGoPoof(string &in asEntityint alState)
{
    if(
alState == 1//Only if the player is look at the area
{
    
AddTimer("Poof"3.0"Gone");
}

void Gone(string &in asTimer)
{
    
SetEntityActive("Spider_1",false);
}
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 OnLeave()
{



<LANGUAGE>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_Key_AlcDoor">Wine Room Key</Entry>
<Entry Name="ItemDesc_Key_AlcDoor">Now I can get into that room. I can almost taste the wine.</Entry>
<Entry Name="ItemName_CellarDoorKey">Cellar Door Key</Entry>
<Entry Name="ItemDesc_CellarDoorKey">I need to get out of here.</Entry>

</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_TakeThis1_Name">Take This</Entry>
<Entry Name="Note_TakeThis1_Text">If you're planning on going into the cellar any time soon, take these. It can get dark in there.[br]Your Landlord</Entry>
</CATEGORY>
<CATEGORY Name=“Messages”>
<Entry Name =“AlLocked”>Locked. There must be a key nearby.</Entry>
<Entry Name =“NoNotThisStuff”>I'm not interested in this stuff. I was told there were some rare vintage wines down here. Part of why I bought the place.</Entry>

</CATEGORY>
</LANGUAGE>



Edit: Moved the ladder around a bunch and kept trying it and finally found a sweet spot where it doesn't mess up.

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: 02-28-2013, 11:52 AM by DeAngelo.)
02-28-2013, 11:41 AM
Find


Messages In This Thread
New to this, having some trouble - by DeAngelo - 02-27-2013, 07:23 AM
RE: New to this, having some trouble - by NaxEla - 02-27-2013, 07:40 AM
RE: New to this, having some trouble - by NaxEla - 02-27-2013, 08:51 AM
RE: New to this, having some trouble - by NaxEla - 02-27-2013, 09:36 AM
RE: New to this, having some trouble - by DeAngelo - 02-28-2013, 11:41 AM
RE: New to this, having some trouble - by NaxEla - 03-02-2013, 10:05 AM



Users browsing this thread: 3 Guest(s)