Page 2 of 2

rotateZup

Posted: Thu Mar 20, 2003 7:12 pm
by tltrude
You don't need the "to" at the end of rotateZup. To make it go back down, just put in a wait "wait 10" line. Then add rotateZdown 90 and another move command line.

You will end up with a trap door that opens upward when triggered, waits 10 seconds, and closes by itself.

If your interested in learning more about how to make things move/blowup/rotate, this totorial map should help a lot. it includes the map file, script, and a playable pk3.

http://pages.sbcglobal.net/tltrude/Temp ... ngdoor.zip


Image

Posted: Thu Mar 20, 2003 8:40 pm
by nuggets
lol, sorry 4 all the confusion!!!

i was a weee bit tired last night yes use rotateXup not moveXup etc... but you can use moveup movedown etc... as this will make it slide

as for the triggerables tho...

if you want the hatch to close behind you then you will need to use this and delete the 2nd trigger, and change the setthread of the 1st trigger you created to trapdoor_move

trapdoor_move:
$trapdoor_trigger nottriggerable
$trapdoor time 3
$trapdoor rotateXup 90 //or rotateXdown or Y or Z as required
$trapdoor waitmove
wait 10 //number of seconds before closing
$trapdoor time 3
$trapdoor rotateXdown 90 //opposite of previous
$trapdoor waitmove
$trapdoor_trigger triggerable
end

you will need these triggerables in there otherwise the door will still be operable while it's moving therefore leaving it at weird angles

on the other hand if you want 2 b able 2 close the door urself then you will need the second trigger as explained previously and combine it in part with this script (but with rotate not move in the script) sorry again :D

Posted: Thu Mar 20, 2003 8:46 pm
by -Gandalf-
thanx both of you ... it works great 8) ... off to the next thing ...

Posted: Sat Mar 22, 2003 2:05 pm
by bdbodger
you can do this too

main:
level.trapdoor = 0
end
secretdoor1_open:
$secretdoor1 time 3
if(level.trapdoor ==0)
{
$secretdoor1 rotatezup 90
level.trapdoor =1
}
else
{
$secretdoor1 rotatezdown 90
level.trapdoor =0
}
end

this way if the door is open it will close if it is closed it will open or this

secretdoor1_open:
$secretdoor1 time 3
$secretdoor1 rotatezup 90
wait 5
$secretdoor1 rotatezdown 90
end

closes by itself after 5 seconds

Posted: Sat Mar 22, 2003 2:43 pm
by nuggets
you can do this too //revised

main:
level.trapdoor = 0
end

secretdoor1_open:
$secretdoor1 time 3
if(level.trapdoor == 0)
{
$secretdoor1 rotatezup 90
level.trapdoor = 2 //this will needed to be set for if the door has not yet reached it's destination, otherwise it will still be triggerable
$secretdoor1 waitmove //muchly needed 2 make it move

level.trapdoor = 1 //now the trapdoor has shut it can become this state where it's only moveable if finished
wait 5 //will be the delay if not closed by then
if (level.trapdoor == 1)
{
level.trapdoor = 2
$secretdoor1 rotatezdown 90
$secretdoor1 waitmove
level.trapdoor = 0 //this will close the door if not closed behind the player
}
}
else
if (level.trapdoor == 1)
{
level.trapdoor = 2
$secretdoor1 rotatezdown 90
$secretdoor1 waitmove //again really needed

level.trapdoor = 0 //then only triggerable again once it's reached this state
}
end

this way if the door is open it will close if it is closed it will open or this

secretdoor1_open:
$secretdoor1 time 3
$secretdoor1 rotatezup 90
$secretdoor1 move //otherwise won't move
wait 5
$secretdoor1 rotatezdown 90
$secretdoor1 move //otherwise still won't move
end //even after this new script you've given, there's still the problem of triggerables the door triggers can still be activated while in motion, therefore leaving strange angles the doors will finish at

closes by itself after 5 seconds

not tested, but very confident!!! :D

Posted: Sat Mar 22, 2003 6:22 pm
by -Gandalf-
yeah that's the only problem ... if not set with triggers i get the weird angles ... its pretty funny that to do a door that is vertical its only a simple thing, but to do something inverted horizontally you have to go through so much trouble ... :roll:

Posted: Sun Mar 23, 2003 2:45 am
by nuggets
lol, too true

it makes you really appreciate the scripting and thought that went into radiant in the 1st place, to be able to draw 2 boxes (1 origin and 1 door) and then by giving it a certain function it makes it a door?

how is this humanly possible, top awards to the guys at radiant!!! :D