Page 1 of 1

Sc-Fi Doors (Problem)

Posted: Mon Jan 05, 2009 12:15 pm
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

Posted: Mon Jan 05, 2009 1:23 pm
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 ;)

hi

Posted: Tue Jan 06, 2009 5:00 pm
by 1lynx1
hi the 270 works but 0 doesnt also then need to go in a bit further ? any sugestions ? .

Cheers,
Lynx

Posted: Tue Jan 06, 2009 5:55 pm
by neillomax
What's completely opposite 270d on the compass ?

hi

Posted: Tue Jan 06, 2009 10:04 pm
by 1lynx1
90 but that doesnt work i have already tried
thanks,
Lynx

Posted: Tue Jan 06, 2009 10:46 pm
by neillomax
how's about 135 ?

Posted: Wed Jan 07, 2009 11:04 am
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.

ok

Posted: Wed Jan 07, 2009 4:23 pm
by 1lynx1
ok cheers i take it -32 is -32 units?

Cheers,
Lynx

Posted: Wed Jan 07, 2009 5:02 pm
by jv_map
Yes it's measured in game units :)

ok

Posted: Wed Jan 07, 2009 5:16 pm
by 1lynx1
ok what grid size ?
1 ?

Cheers,
Lynx

Posted: Wed Jan 07, 2009 6:16 pm
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.

thx

Posted: Wed Jan 07, 2009 6:33 pm
by 1lynx1
thanks :D

Cheers,
Lynx