Need some help with this script.... - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Need some help with this script.... (/thread-8676.html) Pages:
1
2
|
RE: Need some help with this script.... - Tanshaydar - 06-18-2011 AddDebugMessage(string& asString, bool abCheckForDuplicates); For this and more: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions Simply, add a: Code: AddDebugMessage("Debug Message: Area Collided! Now ScaryDude must be activated!", false); RE: Need some help with this script.... - Doctorcheese - 06-18-2011 (06-18-2011, 09:37 PM)Tanshaydar Wrote: AddDebugMessage(string& asString, bool abCheckForDuplicates); Like this? Code: //////////////////////////// It's not working if I do that, maybe the area doesn't collide after all... If that is the case, how could I make it collide with the player? (Damn this is turning into a big thread for one simple script ) RE: Need some help with this script.... - Doctorcheese - 06-19-2011 Ok so I made a new script, I'm trying to replicate the scene where you encounter a grunt at the Spoiler below!
I had a look at their script file and here's how I changed it a bit: (The area is now called ScriptArea_1 and the grunt(placeholder) is called servant_grunt_1.) Code: //////////////////////////// Any errors here? If there are no errors it must be the Area that is not colliding, in that case how do I make it collide with the player? RE: Need some help with this script.... - rojkish - 06-19-2011 void OnStart() { AddEntityCollideCallback("Player","MonsterDoor","CollidePlayerWithMonsterDoor"); } At this ^ you missed both bool abDeleteOnCollide & int alStates, making it correctly would be; "AddEntityCollideCallback("Player","MonsterDoor","CollidePlayerWithMonsterDoor", true, 1);" You've also missed float afFadeTime on the playsoundatentity, making it correctly would be; "PlaySoundAtEntity("MonsterDoor", "react_scare", "Player", 0.0, false);" Other than that there is nothing wrong with the script overall and it should work. In case it doesn't I'll just redo it all for you. Spoiler below!
RE: Need some help with this script.... - Tanshaydar - 06-19-2011 Debug Message doesn't work because you put it in wrong place. Try to put it after '{' RE: Need some help with this script.... - Doctorcheese - 06-19-2011 Ok so now it's like this: Code: void OnStart() Anything wrong? What I think might be wrong is the debug messages place in the script, I think I put it in the wrong place since it's not working at all. RE: Need some help with this script.... - Tanshaydar - 06-19-2011 Code: void OnStart() RE: Need some help with this script.... - Doctorcheese - 06-19-2011 Well it didn't show me any debug messages this time, (used Tanshaydars script) I guess it doesn't collide with the player (the area) How can I make it collide? RE: Need some help with this script.... - Tanshaydar - 06-19-2011 Are you sure "show debug messages" is checked in debug menu? (F1) RE: Need some help with this script.... - Doctorcheese - 06-19-2011 (06-19-2011, 06:16 PM)Tanshaydar Wrote: Are you sure "show debug messages" is checked in debug menu? (F1) Mmhm, it's checked all right. But you can close the thread though, I remade the scene so I'll script it some other time There might be something wrong in my settings that prevent the scripts from working or something like that... |