Page 2 of 3

train switch

Posted: Fri Feb 04, 2005 10:12 am
by tltrude
I don't think there is an easy way to make the train switch move back slowly. But, that is how a train lever works--it has a big spring. I guess you could "hide" the switch and then "show" one that is turned 180 degrees. Then use move again on that one. But, it seems like a lot of work just to make it move slowly back. It might even be easier to make your own script_object lever, like an eletrical box with a lever.

Re: train switch

Posted: Fri Feb 04, 2005 10:38 am
by wacko
tltrude wrote:...make your own script_object lever, like an eletrical box with a lever.
why yes, of course! Thnx :wink:

Posted: Fri Feb 04, 2005 12:22 pm
by Kalti
Thanks tltrude... I'm very happy with the script :D

Btw. I gather there's still no real solution to prevent the trembling of the player when going down with the elevator, somesort of clip perhaps ?

Posted: Fri Feb 04, 2005 8:56 pm
by lizardkid
you could fake it by hovering the player an inch off teh ground, ahead of the elevator.

time

Posted: Sat Feb 05, 2005 3:42 am
by tltrude
Try adjusting the time it takes the elevator to move. But, it is a matter of frame rates and therefore what works on your system may not be jetter free for others.

3-4 seconds per 256 units always seems to work fine for me.

Posted: Sat Feb 05, 2005 10:14 am
by Kalti
Thanks...

Didn't realize it had to do with fps aswell. It totally explains why I got different results on different peecees...

I'll keep the current settings then.

Btw. it's an open elevator, no doors, no closed off shaft... if players get caught under the elevator it's getting misaligned (ie. few units less travel in height) Can I calibrate the elevator now and then in some way ? Perhaps using a script origin with a fixed position ?

Posted: Sat Feb 05, 2005 11:27 am
by Grassy
Yes script origins are the way to go, the elevator will always return to a fixed reference pont then.
Or spawn an orign at the intital elevator origin when the map first starts, for eg;
local.upperelepos = spawn script_origin
local.upperelepos.origin = $venice_lift.origin
//when sending the elevator back up use
$venice_lift moveto local.upperelepos
$venice_lift waitmove

Posted: Sat Feb 05, 2005 12:25 pm
by wacko
yes, that's getting better and better :D

U probably know urself how to do it, but in case (no offense :wink: )
:arrow: add a brush with texture origin to ur lift, like:
make the brush somewhere in ur lift,
texture it with 'origin'
deselect the brush
select a brush of ur lift
press ctrl+e and the whole lift is selected
select the origin brush
do 'add to entity'
now the origin brush is part of the lift.
:arrow: Now, make a script_origin and put it in the center of that origin brush. give it targetname/liftpos_up (because the lift is still upstairs)
:arrow: copy it and drag the copy exactly 360 units below the 1st script_origin. Give it targetname/liftpos_dn
:arrow: Do the same for the weight with targetname/weightpos_up and _dn
:arrow: use this changed parts of the script:

Code: Select all

lift_move:
	$venice_lifttrigger_up nottriggerable
	$venice_lifttrigger_down nottriggerable
	if (level.liftpos==0)
	{
		$venice_lift moveTo $liftpos_up
		$venice_lift move
		$venice_liftweight moveTo $weightpos_dn
		$venice_liftweight waitmove
		level.liftpos=1
	}
	else
	{	
		$venice_lift moveTo $liftpos_dn
		$venice_lift move
		$venice_liftweight moveTo $weightpos_up
		$venice_liftweight waitmove
		level.liftpos=0
	}
	$venice_lifttrigger_up triggerable
	$venice_lifttrigger_down triggerable
end
works fine here :D

Posted: Sat Feb 05, 2005 4:15 pm
by Kalti
Guys... absolutely beautiful... I can't thank you enough :D

Lemme try and get this new elements in myself first.

Posted: Sat Feb 05, 2005 7:38 pm
by Kalti
Done... works like a dream :D

Posted: Sat Feb 05, 2005 8:45 pm
by wacko
Kalti wrote:Done... works like a dream :D
good to hear. Next one will be a piece of cake for u urself :D

gates

Posted: Sun Feb 06, 2005 10:34 am
by tltrude
Does your elevator have sound? I like using "lighthouse_run" because it does not require an ubersound work around.

if (level.liftpos==0)
{
$venice_lift loopsound lighthouse_run
$venice_lift moveTo $liftpos_up
$venice_lift move
$venice_liftweight moveTo $weightpos_dn
$venice_liftweight waitmove
$venice_lift stoploopsound
level.liftpos=1
}

You can also add a sound to the lever/switch.

Posted: Sun Feb 06, 2005 12:28 pm
by Kalti
Thanks tltrude... atm my elevator doesn't have sounds.

Mostly because there's still the matter of finding the right sound for the job. It's a wooden elevator, and I'm looking for the sound a wooden rollercoastertrain makes when it's pulled up by the chain...

sound

Posted: Mon Feb 07, 2005 5:36 am
by tltrude
I don't recall a sound like that in the game. If you find it somewhere on the internet, start a new thread on how to add new sounds to the game.

Posted: Mon Feb 07, 2005 6:54 am
by wacko
I'd try mechanics/wood_fence_locked. It's not a very wooden sound, but hey, were you thinking of even the whole mechanic (gearwheels...) being made out of wood?!