Elevator Help Please All Mapping People

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:

Elevator Help Please All Mapping People

Post by 1lynx1 »

OK Right Im Makeing My Very First Map But..

I Cant Get The Elevator To Work Properly It Works But Only the Floor Moves Up And Goes Smaller With No Controls To Get Back Down :S Please Help Me On This

Thanks,
-SD-Lynx-CL-
Last edited by 1lynx1 on Mon Jun 30, 2008 5:07 pm, edited 1 time in total.
User avatar
211476
Captain
Posts: 273
Joined: Fri Feb 29, 2008 2:20 am
Location: Arizona, USA
Contact:

Post by 211476 »

I don't know if you haven't already read the elevator tutorial here

You might also want to read the rest of the mapping tutorials this place has to offer /tutorials.php?category=All

The way you delete a brush is by pressing and holding shift and click on one in the 3d window and press delete
Image
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Post by PKM »

hightlight brushe(s), backspace .
i'm not f****** angry, i'm from philadelphia .
Image
1lynx1
Warrant Officer
Posts: 141
Joined: Sun Jun 29, 2008 9:07 am
Location: United Kingdom
Contact:

Yeh

Post by 1lynx1 »

I Have Read That Tutorial It Just Makes It Smaller As It Goes Up And i Dont Know Why And Thank You For The Delete Info :)


Still Need Elevator Help Though , Maybe Someone Who Has A Working One Will Share There Experiance With Elevators :)

Thanks,
-SD-Lynx-CL-
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Post your script that may help I don't see how an elevator can get smaller as it goes up that makes no sence .
Image
1lynx1
Warrant Officer
Posts: 141
Joined: Sun Jun 29, 2008 9:07 am
Location: United Kingdom
Contact:

ok

Post by 1lynx1 »

here is my script file located in the same file as bsp file (maps/dm)


// Elevator Script

main:

level waittill prespawn

// bind the switches to the elevator
// so it doesnt look weird
$down_switch bind $elevator_cab
$up_switch bind $elevator_cab

// bind triggers to the switches
$down_trigger bind $down_switch
$up_trigger bind $up_switch

// I had it moved up for lighting
$elevator_cab movedown 8
$elevator_cab time 0
$elevator_cab move

// sets the speed to 64 units per second
$elevator_cab speed 64
// starts on floor 1
level.elepos = 1
$elevator_cab2 speed 64

level waittill spawn

thread elevator_prep

end

elevator_prep:
thread movedown
thread moveup
end

movedown:

// waits until the player triggers the trigger
$down_trigger waittill trigger

// if the elevator is on floor 1 then end
// because it cant go down anymore
if (level.elepos == 1)
end

// turns off the triggers
// until the elevator is done moving
$up_trigger nottriggerable
$down_trigger nottriggerable

// sets another variable
local.position = level.elepos

//turns the switch
$down_switch anim turn

// makes some noise
$elevator_cab loopsound lighthouse_run

// says to move to the floor
// below the one that it is on
$elevator_cab moveto $("floor" + (local.position - 1))
$elevator_cab waitmove
$elevator_cab stoploopsound

$down_switch anim idle

// Tells the variable to minus 1 from itself.
// Makes the variable set to the correct floor.
level.elepos--

// turns the triggers back on
$down_trigger triggerable
$up_trigger triggerable

goto elevator_prep

end

moveup:

$up_trigger waittill trigger

// if the elevator is at the top then end
// because it cant go up anymore
if (level.elepos == 2)
end

$down_trigger nottriggerable
$up_trigger nottriggerable

local.position = level.elepos

$up_switch anim turn

$elevator_cab loopsound lighthouse_run
$elevator_cab moveto $("floor" + (local.position + 1))
$elevator_cab waitmove
$elevator_cab stoploopsound

$up_switch anim idle

level.elepos++

$up_trigger triggerable
$down_trigger triggerable

goto elevator_prep

end


Hope This helps mate Thanks :D
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Well one problem I can see is

Code: Select all

elevator_prep: 
thread movedown 
thread moveup 
end 
If the down trigger is used the last line says goto elevator_prep . But if the up switch was never used the prep thread will start a second instance of the moveup thread even though there is one running already that has not ended because of the line $up_trigger waittill trigger . If a person uses the down button again now after the prep thread you have 3 instances of the moveup thread running . So what do you suppose will happen if the next time a player uses the up trigger ? Well all 3 instances of the moveup threads that have been waiting for the trigger to be triggered will all run . Meaning this line level.elepos++ will run 3 times .
Image
1lynx1
Warrant Officer
Posts: 141
Joined: Sun Jun 29, 2008 9:07 am
Location: United Kingdom
Contact:

ok bdbodger

Post by 1lynx1 »

ok it stil dont work im gonna use the func_door one see if that works but atm i got a problem when my map loads up it has a massive like blue white and black pyramid flashing all over the joint i cant see what it is i really cant maybe someone can help me
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

What your seeing is an error cause when too many brushes are touching a single brush . That is an effect mainly seen by badly created ladders that have many rungs and only a single brush for the side rails . It can be anything like that a wall with many brushes along the top or with a railing like this

/forum/viewtopic.php?t=11313&highlight=glitch
Image
1lynx1
Warrant Officer
Posts: 141
Joined: Sun Jun 29, 2008 9:07 am
Location: United Kingdom
Contact:

thanks again

Post by 1lynx1 »

ok got elevator working now, but does anyone know how to make doors work?
Thanks,
Lynx
Post Reply