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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Several editor questions
BlueFalkon Offline
Junior Member

Posts: 9
Threads: 3
Joined: Apr 2011
Reputation: 0
#1
Several editor questions

I've been doing a decent job with learning the editor on my own but there's a few things that are driving me nuts. I'm also very new to scripting, and even after viewing the main maps in the game I have no clue how scripts work.

The following questions will sound extremely novice, forgive me:

1) How do you adjust the snapping of objects in the editor? The fact that every object moves by 0.25 is very annoying and I hate having to guess by manually entering numbers for the position down to the hundredths. I find it difficult to lean a book or a candle holder up against something for example and I'm sure I'm doing something wrong because for me it's almost impossible.

2) I have a particular room where upon entering I want two things to happen. I want a door at the far end of the room to open with a gust of wind (or possibly just creak open) and I want a painting to fall off the wall. How would I set up a script for this and what would it be? Of course, I also want that typical insanity effect where the player's vision will focus on the event and zoom/blur like in the game.

3) I put a monster in a room to test and see how it works. I start the game in the adjacent room, the music is on and I hear the grunts. Examining the monster, it does nothing but stand still. If I throw a chair at the door, it will break through but just stand there again. I move to another room and repeat the action. It breaks down another door and just stands there. It won't wander and it doesn't bother seeking me out, nor does it disappear on its own if I go very far away.

I have some more questions but I don't want to dump it all right now, I'd like to settle these things first.
05-03-2011, 02:30 AM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
RE: Several editor questions

1) If you click on "Toggle Grid Snapping" you won't have to enter numbers. It's on bottom left corner, one looks like horseshoe.
2) Erm, searching forum and looking for examples. Because giving exact script is not my type. Simply, a script area, a collide function that determines when player enters the area.
3) Place pathnodes.

05-03-2011, 03:09 AM
Website Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#3
RE: Several editor questions

At the bottom left of the screen in the editor, there is snap grid options. There you can edit how much snapping you want between each piece. There is also an anchor button there, it toggles whether you want to snap the objects to the grid or not. The monster in the room, requires some scripting. It needs to have path nodes that direct the monster.

This is how you script it, in a function you create, when either the player interacts with an object, collides with an object, or just a plain timer from the time the player starts playing, or just plainy automatic.

void OnStart()
{
Function01();
}
void Function01()
{
AddEntityPatrolNode("MonsterName", "Node01", 2, "");
}

In the editor, you must go to the "area" category on the right side of the editor screen and in the dropbox once you click it, go find "PathNode", and place it where you want the monster to go once the function is taken in effect. The "MonsterName" is the name of the monster in the editor, the "Node01" is the name of the path node for the path node in the editor, and the "2" is the time between each point it goes to. So yes, you can add more than one path node and patrol node code line. Once the monster completes going to each path node, the monster will dissapear by itself. I hope this has helped you. Good luck. Smile

05-03-2011, 03:09 AM
Find
ricky horror Offline
Member

Posts: 54
Threads: 8
Joined: Apr 2011
Reputation: 0
#4
RE: Several editor questions

(05-03-2011, 02:30 AM)BlueFalkon Wrote: I've been doing a decent job with learning the editor on my own but there's a few things that are driving me nuts. I'm also very new to scripting, and even after viewing the main maps in the game I have no clue how scripts work.

The following questions will sound extremely novice, forgive me:

1) How do you adjust the snapping of objects in the editor? The fact that every object moves by 0.25 is very annoying and I hate having to guess by manually entering numbers for the position down to the hundredths. I find it difficult to lean a book or a candle holder up against something for example and I'm sure I'm doing something wrong because for me it's almost impossible.

You press the + and - next to the 0.25 to adjust how much you want it to snap, or just click 0.25 and enter your own amount. You can also click the magnet to turn off snapping.

(05-03-2011, 02:30 AM)BlueFalkon Wrote: 2) I have a particular room where upon entering I want two things to happen. I want a door at the far end of the room to open with a gust of wind (or possibly just creak open) and I want a painting to fall off the wall. How would I set up a script for this and what would it be? Of course, I also want that typical insanity effect where the player's vision will focus on the event and zoom/blur like in the game.

Place a Script Area there and add an Entity Collide function in your scripting with Player and then type in what you want to happen once you walk into the Script Area. You can place the Script Area anywhere you want. If you want it to happen when you walk into a certain room, put the Script Area in the door way.

(05-03-2011, 02:30 AM)BlueFalkon Wrote: 3) I put a monster in a room to test and see how it works. I start the game in the adjacent room, the music is on and I hear the grunts. Examining the monster, it does nothing but stand still. If I throw a chair at the door, it will break through but just stand there again. I move to another room and repeat the action. It breaks down another door and just stands there. It won't wander and it doesn't bother seeking me out, nor does it disappear on its own if I go very far away.

I have some more questions but I don't want to dump it all right now, I'd like to settle these things first.

You want to put Path Nodes on the ground then script the path you want to monster to walk in. Unless you get close to the monster, then it'll come after you. Otherwide it'll just stand there. [:

EDIT: Damn ninjas got to it while I was typing xD

Amnesia: Ricky's Horror - Full Conversion
(This post was last modified: 05-03-2011, 03:11 AM by ricky horror.)
05-03-2011, 03:09 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#5
RE: Several editor questions

Woah, this appears to be an active thread... XD

05-03-2011, 03:11 AM
Find
BlueFalkon Offline
Junior Member

Posts: 9
Threads: 3
Joined: Apr 2011
Reputation: 0
#6
RE: Several editor questions

I tried the path nodes before and it didn't work. I will try the scripting thing once I read up on it some more. I know absolutely 0 about scripting.

The snap grid button worked, thank you.

I will need to do further testing and read up on scripting before I test the other two.
05-03-2011, 03:58 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#7
RE: Several editor questions

Scripting is easy once you learn it. Just keep trying.

05-03-2011, 04:02 AM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#8
RE: Several editor questions

There is an example script for the door to open in here: http://www.frictionalgames.com/forum/thr...pt+widgets
05-03-2011, 07:08 AM
Find




Users browsing this thread: 1 Guest(s)