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
#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


Messages In This Thread
Hammer break window script? - by ZurkQyulox - 11-14-2013, 05:36 PM
RE: Hammer break window script? - by The chaser - 11-14-2013, 06:55 PM
RE: Hammer break window script? - by ZurkQyulox - 11-14-2013, 07:49 PM
RE: Hammer break window script? - by ZurkQyulox - 11-15-2013, 01:13 PM
RE: Hammer break window script? - by daortir - 11-15-2013, 01:46 PM
RE: Hammer break window script? - by Romulator - 11-15-2013, 02:05 PM
RE: Hammer break window script? - by ZurkQyulox - 11-15-2013, 03:39 PM
RE: Hammer break window script? - by The chaser - 11-14-2013, 09:04 PM
RE: Hammer break window script? - by Romulator - 11-15-2013, 10:57 PM
RE: Hammer break window script? - by ZurkQyulox - 11-16-2013, 08:56 AM
RE: Hammer break window script? - by Romulator - 11-16-2013, 11:13 AM
RE: Hammer break window script? - by ZurkQyulox - 11-16-2013, 01:50 PM



Users browsing this thread: 9 Guest(s)