![]() |
Rod Puzzle - 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: Rod Puzzle (/thread-16078.html) |
RE: Rod Puzzle - FlawlessHappiness - 06-13-2012 Toggle grid-snapping off, and then move it manually RE: Rod Puzzle - BrooksyFC - 06-13-2012 Yeah I've moved them. Are these script areas or something else? Like sticky? RE: Rod Puzzle - Putmalk - 06-13-2012 (06-12-2012, 03:27 PM)beecake Wrote: void OnStart()This is a very ineffective way of solving the problem; all of that can be done in one function to make it easier to a) read, b) debug, c) shorter code. RE: Rod Puzzle - Adny - 06-14-2012 (06-13-2012, 09:59 PM)BrooksyFC Wrote: Yeah I've moved them. Are these script areas or something else? Like sticky?The script beecake provided you is the simplest way to deal with your problem and will not be exactly like the puzzle in the original game (it would take me a few pages to write out exactly what to put in the editor and what to write for scripting, so I will not). If you want it to be exactly like in game, you will have to view FG's map in the map maker while looking at their script for the corresponding level to make sure you fully see how it's done. To make the rods go into the corresponding hole, in the Level Editor, simply place the rod into the machine like you want it to appear in game (ie angle it properly and put about 1/2 or 1/4 of it in the machine's hole). Next, in the "General"tab, make sure "Active" is not checked; then, go to the next tab "Entities" and make sure "static physics" is checked. (This next part is speculation, if you don't have this problem, ignore it.) If you select the rod in your inventory and place it over the machine, does it light up? (if yes, skip, if no, read) To make sure you can interact with the machine with each rod, place a script area over the machine that is roughly the same size. Name this area however you'd like, just know that it is going to be the child (thing you're interacting with) in your useitemcallback. Make sure to go into the "Area" tab and towards the bottom, make sure "ItemInteraction" is checked. This should solve the interaction problem. As for the scripting portion, make sure to remove the item from you inventory, and set the rod with the corresponding color to the one you removed active. Then, add the local variable. When you reach the desired amount of variables (3?), you can trigger your function. If you are unfamiliar with variables, check out this tutorial on the FrictionalGames Wiki, it should be helpful: http://wiki.frictionalgames.com/hpl2/tutorials/script/localandglobalvariables I hope this helped you out. It is sometimes difficult to communicate exactly what to put in the level editor through text, hopefully I made it understandable. RE: Rod Puzzle - BrooksyFC - 06-16-2012 Right, I've managed to get the rods into the machine, how do I have it so the player can't take the rods back out? Cause at the mo they go in but I can remove them RE: Rod Puzzle - FlawlessHappiness - 06-16-2012 You should place the rod_static instead of the item. The static versions are not pickup-able. RE: Rod Puzzle - BrooksyFC - 06-16-2012 I've only found the rods under items. How do I make them static so they are unpickable RE: Rod Puzzle - BrooksyFC - 06-18-2012 Do I have to use the model editor or is it in the level editor? Cause I can't seem to find it RE: Rod Puzzle - Dutton - 06-18-2012 1) Click on the rod with the selection tool. 2) Head to the Entity tab next to General. 3) Check the StaticPhysics option. RE: Rod Puzzle - BrooksyFC - 06-18-2012 Yeah I've checked that and I can still pick it up, like when I put it in, it is still glowing like it's still active. |