scriptmove problem


(S. Monkey) #1

This problem has been posted twice before, but neither time was anybody able to solve it, however it is driving me spare.

I’ve got a safe door as a script mover (it has to be one, not a func_door_rotating) complete with an origin brush in one side of it. They share a targetname and a scriptname, and spawnflags to make them solid.

When I try to load the map I get an error ‘script_mover must have a “model”’

I’ve tried numerous combinations of keys for the two brushes, but it either gives that error message or the origin doesn’t work and the thing starts rotating around the level origin.


(MadMaximus) #2

basicly to move brushes all u need is the brushwork u made, an origin and make them all into a script_mover, spawnflags 2 will make it solid and a targetname and a scriptname and something to trigger it and it should work. how you have your script layed out could be the problem if its not moving in the direction you want it to. x,y,z and the time to move it. if your door is facing the west, then you want to move along the y-axis. if you make a sample map with your door and give it a scriptname and targetname of ‘safe_door’ and then add a func_invisible_user in front of it to activate it with the key/values of
targetname / safe_door_controller
scriptname / safe_door_controller

then try this script and see if it works. it will swing out to the west from where it is at 90 degree’s.

safe_door_controller
{
	activate
	{
		trigger safe_door use
	}
}
safe_door
{
	trigger use
	{
		trigger safe_door open
		trigger safe_door close
	}
	trigger open
	{
		accum 1 abort_if_equal 1
		accum 0 abort_if_equal 1
		accum 1 set 1
		accum 0 set 1
		wait 60
		// playsound sound/effects/open_door.wav  // play the open sound here if u want.
		faceangles 0 270 0 500
		accum 0 set 0
	}
	trigger close  // close safe
	{
		accum 1 abort_if_equal 0
		accum 0 abort_if_equal 1
		accum 1 set 0
		accum 0 set 1
		wait 50
		faceangles 0 0 0 500
		// playsound sound/effects/close_door.wav	// play the close sound if you want.
		accum 0 set 0
	}
}

the accum’s are there so that the door does not get interupted by another activation of the func_invisible_user until they are done the movement.

oh… and the sounds open_door.wav and close_door.wav are not there either, they are just examples of where u can place that code if you want to hear sounds based on the events.


(S. Monkey) #3

The script was fine, but I deleted and remade the mover like you said and it worked. I was certain I’d already tried that though… There must be too much blood in my caffienestream.

Thanks for the help :cool: