Elevator script + map Hilfe...

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

train switch

Post 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.
Tom Trude,

Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Re: train switch

Post by wacko »

tltrude wrote:...make your own script_object lever, like an eletrical box with a lever.
why yes, of course! Thnx :wink:
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post 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 ?
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

you could fake it by hovering the player an inch off teh ground, ahead of the elevator.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

time

Post 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.
Tom Trude,

Image
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post 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 ?
Image
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post 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
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post by Kalti »

Guys... absolutely beautiful... I can't thank you enough :D

Lemme try and get this new elements in myself first.
Image
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post by Kalti »

Done... works like a dream :D
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

gates

Post 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.
Tom Trude,

Image
User avatar
Kalti
Major
Posts: 325
Joined: Sun Mar 16, 2003 11:46 am
Contact:

Post 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...
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

sound

Post 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.
Tom Trude,

Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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?!
Post Reply