weird faceangles scripting problem


(damocles) #1

Lookit:

t_handle1 // handle in left control room (left side bolts)
{
spawn
	{
	accum 1 set 0 // 0=up, 1=down
	}
trigger toggle
	{
	wm_announce "toggled"
	trigger self up
	trigger self down
	}
trigger down
	{
	accum 1 abort_if_equal 1
	resetscript
	wm_announce "down"
	faceangles 0 90 0 1000
	// move left side bolts in
	wait 1000
	trigger topleft_bolt in
	trigger topleft_stem in
	accum 1 set 1
	}
trigger up
	{
	accum 1 abort_if_equal 0
	resetscript
	wm_announce "up"
	faceangles 0 0 0 1000
	wait 1000
	trigger topleft_bolt out
	trigger topleft_stem out
	accum 1 set 0
	}
}

That’s the code that runs my handle. The toggle function gets called by an invis user and all the code executes with one exception - the faceangles commands. They seem to be completely ignored.

However, the strange thing is, if I use a faceangles where only one of the three axis (pitch,yaw,roll) are used, it gets ignored. But if I use 2 or more of the axis they work.

The problem is I want a switch that swings down (sometimes called H-switches or t-bar switches - think frankenstein flicking the switch to zap the monster - those switches :slight_smile: ). So obviously I only want to rotate it in one direction. But it gets ignored if I only use one. It’s madness. I have managed to use faceangles to rotate other script_movers in the map no problem, it’s just this one. The script_mover entity for the handle is nothing out of the ordinary, just standard script_mover. Has an origin brush in the right place and is non solid so it doesn’t squash the player when it comes down.

So what’s up with that?


(Erik-Ftn) #2

I guess you have this sorted out by now, though you’re changing the wrong angles to get a up/down effect. You’re just rotating a fully raised/lowered up/down lever around its axis with that.

Changing this

90 0 0
0 0 0 will go up/down between x- and z-axis

while

0 0 90
0 0 0 will go up/down btw y- and z-axis.

Your change is the rotation that opens normal rotating doors, ie between x- and y-axis.

cheers

Erik


(damocles) #3

I had tried all three axis rotations. Two of them worked but didn’t rotate in the direction I wanted, one of them refused to do anything at all. Of course, this is the one I wanted :frowning:

In the end I abandoned it and switched to using simple buttons :frowning: