[SOLVED] Unlock door with colliding object, Not working - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SOLVED] Unlock door with colliding object, Not working (/thread-15790.html) |
[SOLVED] Unlock door with colliding object, Not working - FlawlessHappiness - 06-02-2012 So the idea is that you put a stone chipper inside a padlock (Which works fine). Then you have to find an object, heavy enough, to throw at the stone chipper, to make the padlock break. Now there is only one object in my map (so far) which could break it, and that is a brick, called "brick_1". Here is how it should work with the script: Here is the script: Spoiler below!
Nothing happens when the brick collides with the script around the padlock... i can't figure out why RE: Unlock door with colliding object, Not working - Theforgot3n1 - 06-02-2012 Since you don't have a response yet I can attempt to help. Quote:void OnCollide_3(string &in asParent, string &in asChild, int alState)When you go out of the "ScriptArea_4", are you sure it makes the entity active? I think collides only trigger when the entity enters the area and not leaves. Also, when you test, is the "ScriptArea_4" normally inactive from the start? RE: Unlock door with colliding object, Not working - Your Computer - 06-02-2012 He has 1 instead of 0 for the collision state argument. However, you should be able to avoid requiring a script to do all of this by modifying the padlock to receive damage. RE: Unlock door with colliding object, Not working - FragdaddyXXL - 06-02-2012 You could check for a collision between the padlock and the brick themselves (without areas) and change the padlock's health to zero when it occurs. RE: Unlock door with colliding object, Not working - Rapture - 06-02-2012 You could use the Distance / Time formula + Timers to achieve the same thing. I know Damascus and his project "The Great Work" has a script already working. RE: Unlock door with colliding object, Not working - FlawlessHappiness - 06-03-2012 Yes both scripts areas are inactive from the start. Ok i solved it with to scripts. One for Activation of the collide script, and one for the deactivation. Strange thing is, that some of the stuff that should happen (Like AddPlayerSanity) only started working when i added a debug message to it.. |