Page 1 of 1

Elevator Help Please All Mapping People

Posted: Sun Jun 29, 2008 9:24 am
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-

Posted: Mon Jun 30, 2008 2:44 am
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

Posted: Mon Jun 30, 2008 11:27 am
by PKM
hightlight brushe(s), backspace .

Yeh

Posted: Mon Jun 30, 2008 5:05 pm
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-

Posted: Tue Jul 01, 2008 8:19 pm
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 .

ok

Posted: Wed Jul 02, 2008 6:53 pm
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

Posted: Wed Jul 02, 2008 8:57 pm
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 .

ok bdbodger

Posted: Thu Jul 03, 2008 3:59 pm
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

Posted: Fri Jul 04, 2008 12:32 am
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

thanks again

Posted: Fri Jul 04, 2008 10:05 pm
by 1lynx1
ok got elevator working now, but does anyone know how to make doors work?
Thanks,
Lynx