Func_Msgboard: A Question About Maps

News | Forum | People | FAQ | Links | Register | Log in

|  | A Question About Maps

Posted by NiG [82.48.229.116] on 2010/10/21 17:13:38

Hi all :)
I'm working on the logic of doors, triggers, buttons and so no.
I would like to ask you this: how do I know how much distance an elevator or a door has to travel ?
In "func_door" entities, the only usefull property about movement is this:
"angle" "0"
I noticed that when "angle" "-2", it means the elevator/door is intended to go down.
It's a bit confusing :/
In "func_button" I have "angle" and "speed".
But nothing of these data is telling me about the displacement, that is, how much an entity has to move (to travel, to translate).
Could someone help me ?
THANKS !!

With Doors
#1 posted by RickyT23 [86.142.195.34] on 2010/10/21 17:41:33
It is controlled by the key "lip". A door will travel the full length of itself, in the direction of the selected angle. For example, a door 128 units high, set to move "up" will travel until the bottom face is in exactly the same place as the top face was to begin with.
If the "lip" key is set to "8" then it will travel 120 units upwards, and there will be a lip of 8 units still showing at the top of the door frame. If you want the door to travel higher you could set the lip to say "-16". This would make it travel 144 units upwards.
Many elevators in Quake are infact doors.
You can set a door to move once when triggered (toggle mode), then stay open/closed until it is triggered again. So if you have a door which is 64 by 64 wide, and 32 units deep, it is set to toggle, and has a lip of "-256", with the direction set to "down", then you can also have a button at the top of the "elevator" and one at the bottom. This way you climb onto it and it wont move until you press the button.
Func_plat doesn't behave like this. If you set a func_plat to be triggered then it will wait in its "up" position until it is triggered, then it wl lower itself. From then on it will move up if you walk onto it, and hen you aren't on it it will lower itself.
NiG: This sort of question should probably be posted in a different thread. I'm not sure which though (the engine coding thread anyone?). Someone is likely to complain!!! (not me).
However, if you have more questions like this one, this would be the thread to post it in (unless a moderator suggests a more suitable place), rather than starting a new discussion thread for each question :)
Dont take this last part out of context, but newcomers always break the forum "rules" (like posting the same messages in multiple threads, starting a new thread when one wasn't needed). I broke loads of rules to begin with!! ;)
#2 posted by gb [89.27.228.186] on 2010/10/21 17:51:36
Get hold of an entity definition file for Quake, this will have most of these things explained. A .def or .fgd file.
Also, the QC source code has all these things explained.
I would advise keeping the game code separate from the engine, and in a script language to allow it to be easily modified and extended. Like it is done in such games as Quake (QuakeC), Doom3 (DoomScript) and Far Cry (Lua, iirc).
Having to change the engine every time you want to code a new entity or expand an old one seems unwieldy.
#3 posted by Spirit [80.171.82.248] on 2010/10/21 18:37:15
Hey, welcome to this message board. Please do not post simple questions like this as new threads. See the message on http://celephais.net/board/create_...
#4 posted by stevenaaus [114.72.248.252] on 2010/10/21 22:07:10
Holy cow Spirit. Is Metl in a wheelchair or something ?

Post A Reply:

Name: |
Title: |
Body: |

Website copyright © 2002-2011 John Fitzgibbons. All posts are copyright their respective authors.