Rotating + "destructable"


(stebbi67) #1

Hi all.

I’m trying to make a door that axis can open and allies can destroy. How I’m trying to do is that :

  1. The door has a func_door_rotating and target name door04.
  2. There is a clip brush around the door which has func_explosive and script name script_gardgate
    The idea is when allies destroy the clip brushes then the door should disappear.

Then I have a script called script_gardgate in my script file ( all scripts in this file works other than this one ).

Axis can open it but when allies tries to destroy it ET crashes and I can’t figure out what I’m doing wrong.

Here is the script :

script_gardgate
{
	spawn // this is called when the game starts and the entity is spawned
	{
		wait 200
		constructible_class 2 // 
		accum 5 set 0
	}
	death // this is called when the entity is destroyed...
	{	
		setstate door04 invisible 	
	}
}


Screenshot of door entities : http://stebbi.homeip.net/temp/door.JPG
Screenshot of clip entities : http://stebbi.homeip.net/temp/clip.JPG
Screenshot of the door and the clip bursh ( clip brush is the high lighted one ) : http://stebbi.homeip.net/temp/radiant.JPG

Any ideas what I might be doing wrong?

Thanks,

Stebbi67


(Wezelkrozum) #2

try this script:


script_gardgate 
{ 
   spawn // this is called when the game starts and the entity is spawned 
   { 
      wait 200 
      constructible_class 2 // 
      accum 5 set 0 
   } 
   death // this is called when the entity is destroyed... 
   {    
      alertentity door04    
   } 
} 

change:

 setstate door04 invisible

to:

 alertentity door04 

(Flippy) #3

Doesn’t ‘alertentity’ open the door? Not sure… but that would be what I expect to happen when I ‘alertentity’ a door.

Other than that I don’t know what could be wrong… You’re idea with the explosive clip brush is the right way to do it afaik.

Maybe try getting the func_explosive to work without the door at first. Make it into some brush so you can see it and delete the setstate door04 line. If that gives the same problem then you know it’s your func_explosive that is wrong.


(Wezelkrozum) #4

could be to. i didn’t knew it sure :slight_smile:


(stebbi67) #5

Thanks for your quick responds.

I have tried to change

setstate door04 invisible

to

alertentity door04

Well the ET does not crash but the door does not disappear.

I forgot to mention that the clip brush works. If I put something silly in the “death” section, of the script, then I can see that the clip brushes are destroyed.

Well this is a double door. I guess that I could make one of them a func_door_rotating and the other func_explosive. The opening will be a bit narrow but better than nothing. Still open for suggestions :wink:

P.s. One of the entities had fog in the edit section of the entities, well forgot to take that out before taking a screenshot. Was experimenting but the fog did not look good on my map.

Stebbi67