"Broken" Door


(Hatey) #1

Hi again!

I want to make a door or gate, where the other side moves back and worth (opens and closes) automatically as if it was broken. I already had a conversation with Pande and he couldnt make it work either, so Im posting about it here. To give you a better idea of whats this about, here is a screenshot:

Ignore the path_corner thingies there, apparently I dont need them. But anyway, I want to left side of the gate to open (go inside the wall partially) so that a player model fits through. Then, after a 3 seconds or so, it will close again automatically, crushing anyone beetween. I want it to repeat this over and over.

So, a malfunctioning door. Players shouldnt be able to trigger it, it should be automatic.
I also want the control panel next it to spark a little, so you know its broken… Im not sure if this is even possible in ET. Yea, this is for Enemy Territory, just mentioning this so you wont give me false info :stuck_out_tongue:


(Qualmi) #2

judging by the picture with the corners and stuff i assume you know how to move the door (pull it left, right). so your problem might be that you dont know how you can loop the door. this is easily done. whereever your door script is located in the script you can just use at the end of the block

trigger self door_malfunction_movement

this way you loop your door. all the other things like adjusting speed and stuff is up to you. with the flikkering thing i cant help.


(Hatey) #3

Well, when I tried that corner thing, the door ended up going up and down instead of side to side, I have no idea why because the path was clearly side to side :/. Also it triggered only when I touched it, and it was supposed to be automatic… I tried to follow Bubbas tutorial about moving platforms but it was for Quake 3 so I had some problems trying to find out the corresponding functions for ET… I told you to ignore the path_corners :stuck_out_tongue:

Pande said I should use func_door instead of func_plat, but I dont know. Apparently I need some more advanced map scripting, which Im useless at.


(Qualmi) #4

no need to touch it or somehow activate it. if you do it with script_movers you could just trigger it from your game_manager spawn event. i think thats the only way. no clue how you could make that with a func_door


(Qualmi) #5

no need to touch it or somehow activate it. if you do it with script_movers you could just trigger it from your game_manager spawn event. i think thats the only way. no clue how you could make that with a func_door.


(TomTom7777) #6

The control panel effects can be triggered either from a func_timer with large randomness or from with-in the script file (wait random…). That can trigger a speaker and say props_smokedust/props_gunsparks or a brush for simulating flames. A target_script_trigger might be useful too depending on how you go about it. But if you want the panel effects to sync with the door movement then you probably want to use the script file trigger method.


(Hatey) #7

Well I was going to make a script_mover at first but it requires a model… How can I make a mover without a model?


(Qualmi) #8

dont have much time, but try this:

  1. create a brush + origin texture
  2. create a brush (this is your door for example)
  3. deselect all, select the originbrush, select the other brush, make them both script_mover
  4. then set all your values like scriptname and targetname

in script then you can talk to the brush via targetname and do things with it like gotomarker etc.

in slowrocks thread i have posted a link about mapscripting. i recommend to read that. also read the other link i gave there.

bye


(stealth6) #9

give it an origin brush.

also I remember seeing a prefab with exactly what you are looking for, but I don’t remember the name
EDIT:
I think it was this one:
http://www.wolfmap.de/details.php?file_id=2040
??
aah I’m not sure, but I think the prefab is on wolfmap somewhere, I’ll have a look again when I get home tonight


(Hatey) #10

Yea, someone already sent me a prefab through PM, called laboratory door or something like that. I havent tested it yet tho.


(Hatey) #11

I tried that laboratory door prefab, and created my own based on that. It works pretty much exactly like I hoped it to, except that its moving too slowly for my needs. You cant pass through unless the door is fully opened, and this takes like 10-20 seconds roughly estimated, which is way too much time to wait around… So, any idea how to change the speed for script_mover? I tried simply adding the “speed” key in the brushes but it had no affect, I even tried adding it to the map script but obviouls it caused an error :slight_smile:


(Qualmi) #12

[QUOTE=Hatey;190962]I tried simply adding the “speed” key in the brushes but it had no affect, I even tried adding it to the map script but obviouls it caused an error :slight_smile:

…[/QUOTE]

ROFL :stroggbanana:

ok. ehem…try this ? ->


gotomarker door_corner2 5
faceangles 0 0 0 gototime

is this somehow similar to what you have in your script ? i think if you increase 5 then you increase the speed, didnt watch for now


(Loffy) #13

Hi!

Let’s use the script below as an example:


game_manager
{
	spawn
	{
		remapshaderflush
		wm_axis_respawntime 1
		wm_allied_respawntime	1
		wm_number_of_objectives 1
		wm_set_round_timelimit	15
		wm_setwinner 1
	}
}

door1_tst
{
 spawn
 {
	wait 50
 }

 trigger start_erraticdoor
 	{
	trigger door1_error shake_it
	}
}

door1_error
{
 spawn
 {
	wait 50
 }

 trigger shake_it
 	{
	 	gotomarker door1_pos1 5
		alertentity door1_sound
		alertentity door1_sparks
		wait 3000
		gotomarker door1_pos3 5
		alertentity door1_sound
		alertentity door1_sparks
		wait 6000
	 	gotomarker door1_pos2 5
		alertentity door1_sound
		alertentity door1_sound2
		alertentity door1_sparks
		wait 3000
		gotomarker door1_pos3 5
		alertentity door1_sound
		alertentity door1_sparks
		wait 3000
		trigger self shake_it
	}
}

You can play around with two values: the gotomarker speed value and the wait value. For example, you can change it to:


	 	gotomarker door1_pos1 100
		alertentity door1_sound
		alertentity door1_sparks
		wait 1000

Loffy