Sc-Fi Doors (Problem)

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
1lynx1
Warrant Officer
Posts: 141
Joined: Sun Jun 29, 2008 9:07 am
Location: United Kingdom
Contact:

Sc-Fi Doors (Problem)

Post by 1lynx1 »

as you all probly know ive been makeing a stargate mod for medal of honor as it has been christmas i havent done much in the last month i have made the doors but im haveing a problem,
The doors are like this and need to go in direction of the arrows
http://img388.imageshack.us/img388/1395/doorsiz5.jpg
what angles do i need for this ?

Thanks,
Lynx
Condor
Colour Sergeant
Posts: 82
Joined: Mon Apr 09, 2007 3:19 pm
Location: Bavaria (Germany)

Post by Condor »

If they open to the east and to the west, use 0 for the right one, and 180 for the left one, otherwise use 90 and 270.

If you want to see a soft movement, create the 2 doors as script object and use a script like this

Code: Select all

main:
	level.door1stat = 0
	level.door1range = 60.0
end
opendoor:
	$opendoortrigger nottriggerable
	thread opendoor1
	thread opendoor2
end
opendoor1:
	local.t = 0.0
	for(local.i = 0; local.i <= level.door1range; local.i++) {
		local.t = (level.door1range / -2 + local.i) / level.door1range
		$door1 time (local.t * local.t)
		if (level.door1stat == 0) {
			$door1 moveSouth 1
		} else {
			$door1 moveSouth -1
		}
		$door1 waitmove
	}
end
opendoor2:
	local.t = 0.0
	for(local.i = 0; local.i <= level.door1range; local.i++) {
		local.t = (level.door1range / -2 + local.i) / level.door1range
		$door2 time (local.t * local.t)
		if (level.door1stat == 0) {
			$door2 moveSouth -1
		} else {
			$door2 moveSouth 1
		}
		$door2 waitmove
	}
	wait 1
	if (level.door1stat == 0) {
		level.door1stat = 1
	} else {
		level.door1stat = 0
	}
	$opendoortrigger triggerable
end
$door1 and $door2 are just the targetnames of the script_object doors, door1range is the distance the door moves when opened. For opening use moveWest, for closing use moveEast, or moveNorth and moveSouth.
The trigger for opening/closing has the targetname opendoortrigger. I know, it's a bit uhm..long :oops: but you might try it and play around with the parameters. No Sci-Fi doors opens with a constant speed ;)
...waking up in the middle of the night with your hands covered in blood and you have no idea what happened.
1lynx1
Warrant Officer
Posts: 141
Joined: Sun Jun 29, 2008 9:07 am
Location: United Kingdom
Contact:

hi

Post by 1lynx1 »

hi the 270 works but 0 doesnt also then need to go in a bit further ? any sugestions ? .

Cheers,
Lynx
neillomax
Lieutenant General
Posts: 880
Joined: Thu Jun 23, 2005 6:57 am

Post by neillomax »

What's completely opposite 270d on the compass ?
1lynx1
Warrant Officer
Posts: 141
Joined: Sun Jun 29, 2008 9:07 am
Location: United Kingdom
Contact:

hi

Post by 1lynx1 »

90 but that doesnt work i have already tried
thanks,
Lynx
neillomax
Lieutenant General
Posts: 880
Joined: Thu Jun 23, 2005 6:57 am

Post by neillomax »

how's about 135 ?
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

It's got to be 90 :? . What do you mean it doesn't work?

You can adjust the distance the door slides by using the 'lip' key/value. To have the door slide further into the wall you need a negative lip value, for example lip / -32.
Image
1lynx1
Warrant Officer
Posts: 141
Joined: Sun Jun 29, 2008 9:07 am
Location: United Kingdom
Contact:

ok

Post by 1lynx1 »

ok cheers i take it -32 is -32 units?

Cheers,
Lynx
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yes it's measured in game units :)
Image
1lynx1
Warrant Officer
Posts: 141
Joined: Sun Jun 29, 2008 9:07 am
Location: United Kingdom
Contact:

ok

Post by 1lynx1 »

ok what grid size ?
1 ?

Cheers,
Lynx
Condor
Colour Sergeant
Posts: 82
Joined: Mon Apr 09, 2007 3:19 pm
Location: Bavaria (Germany)

Post by Condor »

You can use every grid size you want to use, as long as the door is not totally hidden in the wall after you've opened it.

Changing the grid size does not change the world units. If the door has a width of 64 units, use a lip value of 60 for example.
...waking up in the middle of the night with your hands covered in blood and you have no idea what happened.
1lynx1
Warrant Officer
Posts: 141
Joined: Sun Jun 29, 2008 9:07 am
Location: United Kingdom
Contact:

thx

Post by 1lynx1 »

thanks :D

Cheers,
Lynx
Post Reply