ground door - not slide but open up or down

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
-Gandalf-
Sergeant
Posts: 57
Joined: Sat Feb 22, 2003 9:45 pm
Location: Argentina - BS AS
Contact:

ground door - not slide but open up or down

Post by -Gandalf- »

quick question, sorry, how can i make my horizontal chunk of wood in a house open up as a door upwards or downwards thus leading into a tunnel that leads to another house ...

i tried making an origin as the place where the hinge would be with the func_rotatingdoor but the door opens horizontally and not opposite ...

hope your understanding what i mean ... its like a trap door only that you open it youself and instead of sliding i want it to open upwards like a normal door only lets say kicked to the ground ... :roll:

it works if i give the piece in the floor the func_door entity but that way its slides ... i want it to work as a normal door ....

tried also fidling around with func_rotatingdoor with the -1 or -2 angles but with func_rotatingdoor the door opens instead of sliding but not up or down but left or right horizontally ... i need it to go up or down vertically ...

sorry for all the bla

thanx in advance
Yarik
General
Posts: 1031
Joined: Thu Jan 09, 2003 7:12 pm
Contact:

Post by Yarik »

:? Surgeon or JV you should add a rule to the posting section.
stating this "Before you post any of your questions Always use the search button at the top of the forums this will help you see many of teh answered questions, if you dont find what you were looking for then ask help on the .MAP forums"

Use the search man we had a pretty lot of people who asked this question.

ex

_______________________
|.......................................|
|.......................................|
|.......................................|
|.......................................|
|.......................................|
|.......................................|
|.......................................|
|....<---Origin-------->........|

Have the origin at the bottom where you want it to turn then have the whole thing covered with the func_rotating door.
Skype: Yarik_usa
www.skype.com <---free pc2pc phone
Image
User avatar
-Gandalf-
Sergeant
Posts: 57
Joined: Sat Feb 22, 2003 9:45 pm
Location: Argentina - BS AS
Contact:

Post by -Gandalf- »

sure about that? ... non-sliding horizontal ground-doors ...

i tried a search with trap-door, ground-door, door ... and there's a lot of gibberish ... only thing i came with was a trap door but it only help me get it to slide-open not open upwards/downwards ... :wink:

EDIT: you mean place the door brush

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

and below this as in lower z value have the origin brush? ... as in the door brush will open towards the origin brush ... :?:
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

lol, how much time i'm spent with this problem!!!

1stly, create the door and origin as i guess you must of done but 4 others reading this :D

2nd, select the 2 and go 2 script->object,
give them
key: targetname
value: trapdoor
this can be anything you like but it's just 4 the reference in the script

3rd, create a trigger over the trapdoor and go 2 trigger->use
and then
key: targetname
value: trapdoor_trigger
again this can be what you want it 2 b, and also
key: setthread
value: trapdoor_open
this will get the relevant thread of script when the trigger is activated

4th, open up your script, this will need 2 b called the same as your map e.g mymap.map mymap.scr
then inside the script after
main:
end
insert this script

trapdoor_open:
$trapdoor time 3 //this 3 can b changed it's a 3second open but can be what ever you like depending how long you want it 2 take 2 open
$trapdoor moveXdown 90 //change the moveXdown to moveYdown or moveZdown, this can only be sorted by you depending on the posotion of the origin to the door,
// the 90 can b changed to anything again, like 180 or 135 or even 101 if ya want 2, it's the angle it will open up 2 or down 2
$trapdoor move //tells the object to move
end

if you have anymore problems with this which you will have, i,e only getting it 2 open once, not being operable while it's moving, and finally getting it 2 close, contact me at YAHOO MESSANGER mr_crazy_nugget :D i'll post the rest at a later date tho, just have something 2 do right now :D

or alternatively, you can send me your map at jks_here@hotmail.com and i'll do the scripting bit 4 ya with the recognition on ur scripting :D
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
-Gandalf-
Sergeant
Posts: 57
Joined: Sat Feb 22, 2003 9:45 pm
Location: Argentina - BS AS
Contact:

Post by -Gandalf- »

thanx nuggets for all that ... it'd prob work that way but there has to be a more faster-mechanic way of doing it ...

isnt there another way of making a door flip ehhh i guess it would be Y-axis without using scripts or triggers ...

no offense to your help there, but so as to not add many .scr to my map ...

cause yeah as it stands, the door which is obviously wider yet short than normal doors opens as a normal door thus overlaping over the rest of the ground ... flip y axis in an easier way? ...

if not then i'll go right at it and use the script and triggers ...
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

lol, np's at all, if u do find a way around it then let us know, but as far as i know, and god was i tryin 4 ages, that's the only way i could get it 2 work :D
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
-Gandalf-
Sergeant
Posts: 57
Joined: Sat Feb 22, 2003 9:45 pm
Location: Argentina - BS AS
Contact:

Post by -Gandalf- »

ok then i'll try it that way if not i'll get behind and i'll never finish this ...

thanx a bunch nuggets i'll post if it works out or not :wink:
User avatar
-Gandalf-
Sergeant
Posts: 57
Joined: Sat Feb 22, 2003 9:45 pm
Location: Argentina - BS AS
Contact:

Post by -Gandalf- »

ok here we go with the errors ... lets see first off ... i have my .map in the main/maps folder alongside the recently created .scr file

my .scr file has this inside

Code: Select all

 main:
end

secretdoor1_open:
$secretdoor1 time 3
$secretdoor1 moveYup 90
$secretdoor1 move
end
as in secretdoor1_open is the setthread in the trigger brush ...

and secretdoor1 im supposing is the targetname from the object-script brush ...

okay ... i have in radiant that my origin brush is set up as a script-object
with targetname - secretdoor1 as well as my door brush

my trigger brush surrounds them both as the ladder brush surrounds a ladder ... and in my trigg brush which is set up as trigger-use setthread is secretdoor1_open and tragetname is secretdoor1trig (now should this be called secretdoor1 as to target the targetname of the orig and door brushes?) ...

anyhow that's how its in radiant sooo ....

when i enter it throughs this at the console

Code: Select all

unknown command: moveYup
$secretdoor1 moveYup 90 (maps/ciudad2.scr, 6)
$secretdoor1 ^
^-^-^ Script file compile error: couldnt compile 'maps/ciudad2.scr'
^-^-^ Game (Event: 'setthread', Object: 'TriggerUse'): Script 'maps/ciudad2.scr' was not properly loaded
ScriptMaster ::GetScript:Script 'maps/ciudad2.scr' was not properly loaded
something of the sorts ...

anyway ... i think i should change that secretdoor1trig to secretdoor1 ...
and perhaps the moveYup to moveYdown or something ...

besides that ... dunno ... maybe have something in the .scr besides
main:
end

and the script ... help!
thanx

p.s. i dont have yahoo msn ... i got msn or icq ... my number and mail for them are below my post ...
rOger
Major
Posts: 290
Joined: Wed Feb 05, 2003 8:56 pm
Location: Sweden

Post by rOger »

A small map with a trapdoor.

http://www.affv.nu/ra/trapdoor.zip

the bsp is compiled for spearhead and there might be some textures from spearhead also, and I haven't tried it in AA.

The script is rough but it seams to work, feel free to change it. I would however appreciate if you gave me the improvements that you make. :D
Looking for a good game? Play GO the ancient asian game of strategy.
User avatar
-Gandalf-
Sergeant
Posts: 57
Joined: Sat Feb 22, 2003 9:45 pm
Location: Argentina - BS AS
Contact:

Post by -Gandalf- »

ok i got my little door in the ground to actually open upwards yey ...

i used this as my script

Code: Select all

main:
end

secretdoor1_open:
$secretdoor1 time 3
$secretdoor1 rotateZupto 90
$secretdoor1 move
end
but like you said nuggets i now have to find the way to make it possible to close it ... i was actually gonna let it stay open forever unless closed by the player ... so any ideas how to make it close

i was thinking some sort of condition in the script so that if secretdoor1_open is acted then open a new condition in which
$secretdoor1 rotateZdownto90 ...

but i'm still not that fond with scripting so i would need some help with that ...
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

came back online just 2 sort this problem :D

if you create another trigger as i said in the 3rd stage but this time give it
key: targetname
value: trapdoor_trigger2
and
key: setthread
value: trapdoor_close

a little easier this time as half the work u've already done :D

now back 2 the script

add after the "end" on the trapdoor_open

trapdoor_close:
$trapdoor time 3
$trapdoor moveXup 90
$trapdoor move
end

now this will make it close... but 1 problem... you will be able 2 activate the trigger when it's already closed... damn it...

the solution, i'll do the whole script here 4 ya now :D

main:
$trapdoor_trigger2 nottriggerable
end

trapdoor_open:
$trapdoor_trigger nottriggerable //will prevent it being activated until it's been closed and made triggerable again
$trapdoor time 3
$trapdoor moveXdown 90
$trapdoor waitmove //note i've now changed this 2 waitmove, lines after this won't b performed until it's finished moving
$trapdoor_trigger2 triggerable //makes it able to be closed
end

trapdoor_close: //then visa versa
$trapdoor_trigger2 nottriggerable
$trapdoor time 3
$trapdoor moveXup 90 //note this has changed to up now
$trapdoor waitmove
$trapdoor_trigger triggerable
end

//then hey presto 1 fully working trapdoor :D i should really still ask 4 credit in the scripting lol, but it's ok, it's ur conscience, lol jokin :D
hope this helps, prob not cos it's all foreign 2 me :-/
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

i should really of read your reply before i went off and typed that... we'll not comment on that any further :p

are you sure that the entity names were correct when you came 2 compile it, as long as they don't have any spaces in you can use anything for threads and entity names, but people use relevant names just 4 the clarity when they look back on it 2 days later

as for the moveXup, moveXdown, moveYup etc..., depending on which side the origin is to the entity it will determine which way it gies, so scripting move*up will make it sometimes go up and sometimes go down

anyways, hope this sorts it all 4 ya, you can also add in the script

$trapdoor playsound metal_bunker_door_open //self explanitory

there are other sounds you can use but i was just tryin 2 find 1 quickly,
remember 2 put this before waitmove and in both open and close script :D
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
-Gandalf-
Sergeant
Posts: 57
Joined: Sat Feb 22, 2003 9:45 pm
Location: Argentina - BS AS
Contact:

Post by -Gandalf- »

you know the game tells me that "move"Ydown or "move"Xdown are not valid commands as in "they dont exist" that's why i used rotateZupto or rotateYto ... cause i tried with move and it doesnt run the script ... unknown command

anyway ... dunno the point of triggerable and nottriggerable ... what is that ... so when you open it, it moves onto the close section of the script or it helps it remain at that part ...

i mean with waitmove you can hold off the close part of the script and then when it totally opens it goes straight to the next which is that ... unless the triggerable things lets it repeat itself so you can close open as many times or it lets you close whilst opening it ... dunno what's that for? ...
Surgeon
Site Admin
Posts: 1386
Joined: Tue Jun 04, 2002 1:15 am
Location: Stirling, Scotland
Contact:

Post by Surgeon »

Yarik - See Rule Number 7 :D - but its also true that the search function isn't always 100% accurate and will return some wierd stuff....
Admin
Image

.map Forums

Truth and Honor.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Use moveup, not moveYup.

Btw this is scripting ;).
Image
Post Reply