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
#1
Hammer break window script?

Is there a script that allows a hammer to be used on a window to break it?

Please reply Smile
11-14-2013, 05:36 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Hammer break window script?

Yeah, more or less:

I need to know what window are we talking about and what hammer do you want to make it break. Saying their names (like hammer_1) will help too Smile

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-14-2013, 06:55 PM
Find
ZurkQyulox Offline
Junior Member

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

(11-14-2013, 06:55 PM)The chaser Wrote: Yeah, more or less:

I need to know what window are we talking about and what hammer do you want to make it break. Saying their names (like hammer_1) will help too Smile
Example: Use hammer_1 on window = broken window, what i ment was that if you use a hammer on a normal window it turns into a broken window which you can go through

(11-14-2013, 06:55 PM)The chaser Wrote: Yeah, more or less:

I need to know what window are we talking about and what hammer do you want to make it break. Saying their names (like hammer_1) will help too Smile
Btw your custom story looks nice, when is it coming out?
(This post was last modified: 11-14-2013, 07:51 PM by ZurkQyulox.)
11-14-2013, 07:49 PM
Find
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#4
RE: Hammer break window script?

void OnStart()
{
AddEntityCollideCallback("Hammer_1", "Window_1", "Break", false, 0);
}

void Break(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Window_1", false);
SetEntityActive("Window_2", true);
}

Place you broken window entity in the same location as your original window and set it to NOT active, de-check the active box. Window_2 will be the broken one and Window_1 will be the original one; you can name them whatever you may, I'm just giving an example.

You could then go in and create a particles system or two or three, some sounds, whatever you will.

Oh, if the window(s) is/are a static object and not an entity, you'll need to use the SetPropActiveAndFade script instead of the SetEntityActive. I just threw this together without testing but can say it should work if done correctly. It's not very advanced but you can tinker with this and that and perfect it to the way you'd like.

Hope this helps.

-Grind to the Gore-
(This post was last modified: 11-14-2013, 08:57 PM by GoreGrinder99.)
11-14-2013, 08:44 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#5
RE: Hammer break window script?

Well, GoreGrinder pretty much summed it up.

Abour my story: Progress is slow, as I try to improve the quality of the mod as much as possible. I don't have a release date, but it won't be soon Sad

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-14-2013, 09:04 PM
Find
ZurkQyulox Offline
Junior Member

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

(11-14-2013, 08:44 PM)GoreGrinder99 Wrote: void OnStart()
{
AddEntityCollideCallback("Hammer_1", "Window_1", "Break", false, 0);
}

void Break(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Window_1", false);
SetEntityActive("Window_2", true);
}

Place you broken window entity in the same location as your original window and set it to NOT active, de-check the active box. Window_2 will be the broken one and Window_1 will be the original one; you can name them whatever you may, I'm just giving an example.

You could then go in and create a particles system or two or three, some sounds, whatever you will.

Oh, if the window(s) is/are a static object and not an entity, you'll need to use the SetPropActiveAndFade script instead of the SetEntityActive. I just threw this together without testing but can say it should work if done correctly. It's not very advanced but you can tinker with this and that and perfect it to the way you'd like.

Hope this helps.
Thank you i'll try it out as soon as i can

(11-14-2013, 09:04 PM)The chaser Wrote: Well, GoreGrinder pretty much summed it up.

Abour my story: Progress is slow, as I try to improve the quality of the mod as much as possible. I don't have a release date, but it won't be soon Sad
Okay but it's gonna be awesome when you're done, btw do you have a good script for a jump scare?
(This post was last modified: 11-15-2013, 01:20 PM by ZurkQyulox.)
11-15-2013, 01:13 PM
Find
daortir Offline
Senior Member

Posts: 422
Threads: 9
Joined: Sep 2013
Reputation: 18
#7
RE: Hammer break window script?

No : >
There is no such thing as a good script for a jumpscare.
A "good" jumpscare, if such thing exists, could be anything, it's about WHEN you use it in my humble opinion.

11-15-2013, 01:46 PM
Find
Romulator Offline
Not Tech Support ;-)

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

(11-15-2013, 01:13 PM)ZurkQyulox Wrote: Okay but it's gonna be awesome when you're done, btw do you have a good script for a jump scare?

The only "good" jumpscares, in my opinion:
- Something in another room falls off something high, and is noticeable on enter/re-enter. It's not exactly a jumpscare, but the sound effect may trigger something.
- A painting or something falls off the wall. This gets me everytime.
- Music starts playing in a room where appropriate (choir, piano, etc)
- A trapdoor opens below you, causing you to fall to somewhere underneath.

All can be scripted fairly simply Smile

When making a serious CS, do not use these:
- A grunt charges at you and disappears just before it hits you
- Everything suddenly flings at you
- No overused scare stuff, like a really loud GONG effect when you look at something.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
11-15-2013, 02:05 PM
Find
ZurkQyulox Offline
Junior Member

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

(11-15-2013, 02:05 PM)Romulator Wrote:
(11-15-2013, 01:13 PM)ZurkQyulox Wrote: Okay but it's gonna be awesome when you're done, btw do you have a good script for a jump scare?

The only "good" jumpscares, in my opinion:
- Something in another room falls off something high, and is noticeable on enter/re-enter. It's not exactly a jumpscare, but the sound effect may trigger something.
- A painting or something falls off the wall. This gets me everytime.
- Music starts playing in a room where appropriate (choir, piano, etc)
- A trapdoor opens below you, causing you to fall to somewhere underneath.

All can be scripted fairly simply Smile

When making a serious CS, do not use these:
- A grunt charges at you and disappears just before it hits you
- Everything suddenly flings at you
- No overused scare stuff, like a really loud GONG effect when you look at something.
Okay but what if i want a grunt to spawn behind a doorm then start breaking it when a player interact with a area, how do you do that?

(11-15-2013, 02:05 PM)Romulator Wrote:
(11-15-2013, 01:13 PM)ZurkQyulox Wrote: Okay but it's gonna be awesome when you're done, btw do you have a good script for a jump scare?

The only "good" jumpscares, in my opinion:
- Something in another room falls off something high, and is noticeable on enter/re-enter. It's not exactly a jumpscare, but the sound effect may trigger something.
- A painting or something falls off the wall. This gets me everytime.
- Music starts playing in a room where appropriate (choir, piano, etc)
- A trapdoor opens below you, causing you to fall to somewhere underneath.

All can be scripted fairly simply Smile

When making a serious CS, do not use these:
- A grunt charges at you and disappears just before it hits you
- Everything suddenly flings at you
- No overused scare stuff, like a really loud GONG effect when you look at something.
And btw if you have time, tell me how im going to do if i want those scares you gave me.
(This post was last modified: 11-15-2013, 03:40 PM by ZurkQyulox.)
11-15-2013, 03:39 PM
Find
Romulator Offline
Not Tech Support ;-)

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

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.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
11-15-2013, 10:57 PM
Find




Users browsing this thread: 2 Guest(s)