easy elevator script

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

Moderator: Moderators

Post Reply
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

easy elevator script

Post by bdbodger »

I know I know not another elevator script :(

Well I think this one is a bit different . All you have to do is make 2 triggers one for each floor have them target each other . Make 2 switches . 2 script origins to put on the foor in front of the elevator . and 2 sets of func_doors .

That does not sound too bad does it ? Ok you have to set the keys on the triggers for it to work but it is not that bad .

Code: Select all

Usage: exec global/easy_elevator.scr <floor 1 trigger targetname>

example: exec global/easy_elevator.scr floor1_trigger

---------------------------------------------------------------------------------------------------

create 2 triggers and 2 switches(animate_equipment_electric-switch-nopulse)
with different targetnames 1 for each floor

create 4 func_doors 2 each for each floor each pair with the same targetname

create 2 script origins with different targetnames and place them on the floor in front of each
set of doors on each floor

---------------------------------------------------------------------------------------------------
Triggers classname	trigger_use
---------------------------------------------------------------------------------------------------
key:		value:			comment:
---------------------------------------------------------------------------------------------------

$floor		elevator1_floor1	set value to the targetname of the script origin in front of the door
target		elevator_trigger2	set value to the targetname of the other trigger for the other floor
#set		1			set value to set number 1 first floor , 2 for second floor
$doors		elevator1_door1		set value to the targetname of the doors on this floor
$cab		elevator_1		set value to the targetname of the elevator cab ( same for both triggers)
$switch		elevator1_switch1	set value to the targetname of the switch on this floor
targetname	elevator_trigger	set value to the targetname of this trigger
---------------------------------------------------------------------------------------------------

repeat the same steps for the other trigger

---------------------------------------------------------------------------------------------------

Doors func_door
---------------------------------------------------------------------------------------------------
key:		value:			comment:
---------------------------------------------------------------------------------------------------
time		2			set time to 2 for speed of door
doortype	metal or wood
spawnflags	160 			or check the toggle and targeted check boxes

targetname	elevator1_door1		set value to the targetname of this set of doors
					(same targetname for each pair on same floor)

lip		0			set the amount of door that shows when open

angle		90 , -1 or -2		set value to -1 for a door that moves up or -2 for door that moves down
					for doors that move sideways set to the angle of travel that door will move
---------------------------------------------------------------------------------------------------

script_origin
---------------------------------------------------------------------------------------------------
create 2 script origins with different targetnames and place them on the floor in front of each
set of doors on each floor
---------------------------------------------------------------------------------------------------
Interested ? download this pk3 user_easy_elevator.pk3 it has the .map file in it and a map to you to try it out .
Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

hmmm. what does it do?
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

are you stupid or just ignorant :P

its a global elevator script... duh :wink:
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

well, I guess im ignorant, why else am i here?
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

Only "Stupid or Ignorant" people "DONT" ask questions!

Viper pay no attention to Fungus brain, he needs to curb his replies until his brain catches up.. :evil:

The script above is as he says, a global script to control elevators from any of your map scripts, you just need to pass it certain parameters to make it do what you need, having a global script means less reproduction of a like routine, just like they did with the standard global scripts to control bombs, text, Ai etc etc..

Grassy.
An ambiguous question will get a similar answer...
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

I use and i approve !!!

Is very simple to use into your maps. :lol:
Post Reply