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
Hammer break window script?
ZurkQyulox Offline
Junior Member

Posts: 7
Threads: 1
Joined: Nov 2013
Reputation: 0
#11
RE: Hammer break window script?

(11-15-2013, 10:57 PM)Romulator Wrote: Well, firstly, you can't learn how to do things if I just give you a/the script. You only learn when you try it.

And you cant just simply script these, you need to design your map to be suited for the scripting to work. Making a pitfall trap (a hole in the ground outside) would be more difficult to make than in indoor one, but would probably be kind of silly unless really incorporated well. After seeing Ash (Pokemon) fall into that many, it becomes clichè.

Think about how something happens if something occurs.

Example
> Player needs to pick up the key
> Player walks over towards the key
   > Player hears noise of enemy
     > Player becomes scared
      - Trigger a insanity event
      - Use visual effects
      - Slow movement for a brief moment
      - Return to normal with slight sanity loss
   > Noise of enemy has ended
     > Player continues on
      - Enemy gets louder
      - Player can realise danger
        - Lower Sanity slightly
        - Cue effects and slow movement as before
     > Enemy begins to bang on a door in the other room
        - Player feels potential to hurry
        - Start breathing sound effects
   > Player picks up key
   [continue code]

That psuedocode is an example of what you should do. Think about what you mainly want, then add to the immersion.
Well, it isn't hard to design the room, all i need too do is design a nice room and then place out the script area which the player will be going through to get the key or when the player has gotten the key and is on their way out. Now the hard thing is, how do i script so that the monster will start breaking the door (door_10 for example) when player walks through scriptarea_5? And also it would be pretty awesome if you guys learn me how to put in some effects! Big Grin
11-16-2013, 08:56 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#12
RE: Hammer break window script?

(11-16-2013, 08:56 AM)ZurkQyulox Wrote: Well, it isn't hard to design the room, all i need too do is design a nice room and then place out the script area which the player will be going through to get the key or when the player has gotten the key and is on their way out. Now the hard thing is, how do i script so that the monster will start breaking the door (door_10 for example) when player walks through scriptarea_5? And also it would be pretty awesome if you guys learn me how to put in some effects! Big Grin

A monster will destroy any door in which has a pathnode on the other side of a closed door.

Example
☻/ |
/▌ |
/ \ | . <- Pathnode goes here.

All you need to do is spawn the enemy and make it walk to the pathnode via scripting. It will tear down the door in 2-3 hits.
Optionally, you can mess around with the door physics to make it unbreakable, and when the player gets to a certain position, it "breaks" by exploding because the monster ate some spinach.

For General Screen effects you can mess around with, I recommend this.
For working with pathnodes and stuff, try this link.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 11-16-2013, 11:13 AM by Romulator.)
11-16-2013, 11:13 AM
Find
ZurkQyulox Offline
Junior Member

Posts: 7
Threads: 1
Joined: Nov 2013
Reputation: 0
#13
RE: Hammer break window script?

(11-16-2013, 11:13 AM)Romulator Wrote:
(11-16-2013, 08:56 AM)ZurkQyulox Wrote: Well, it isn't hard to design the room, all i need too do is design a nice room and then place out the script area which the player will be going through to get the key or when the player has gotten the key and is on their way out. Now the hard thing is, how do i script so that the monster will start breaking the door (door_10 for example) when player walks through scriptarea_5? And also it would be pretty awesome if you guys learn me how to put in some effects! Big Grin

A monster will destroy any door in which has a pathnode on the other side of a closed door.

Example
☻/ |
/▌ |
/ \ | . <- Pathnode goes here.

All you need to do is spawn the enemy and make it walk to the pathnode via scripting. It will tear down the door in 2-3 hits.
Optionally, you can mess around with the door physics to make it unbreakable, and when the player gets to a certain position, it "breaks" by exploding because the monster ate some spinach.

For General Screen effects you can mess around with, I recommend this.
For working with pathnodes and stuff, try this link.
Thanks i'll try that out!
P.S Lol you used bob on that one
11-16-2013, 01:50 PM
Find




Users browsing this thread: 1 Guest(s)