For those who want things to rotate without scripting!! -
09-27-2002, 01:16 AM
Look at this unless you allready have read about this over at TMT.
Rotating using func_rotatingdoor
Ok!! I tried something different, why script the freaking fan (or windmill)!, at least when you just want something that just rotates! I started to play with the func_rotating door and on my first try I got it rotating without any script. I'm showing a picture of how its done (ok I didn't bother to make it look good and just took the textures I already used).
The basics one origin brush and then the brushes who are supposed to rotate attached to that origin brush. Add func_rotatingdoor to it (the same way as when you make a door). Then hit the N key and add the key: rotatez value: 360
My testfile (please report if it doesn't work for someone, I might just try and record a movie of it then to prove myself right! that rotating thing won't show on screenshoots biggrin: )
[url=http://w1.261.telia.com/~u26123487/rotatetest.zip:3ac94]Testfile! Map and bsp[/url:3ac94]
Since I found out about the rotating thing I have learnt that you can rotate using the following directions
rotatex
rotatey
rotatez
Also found out that it isn't the value "360" that makes it rotate, that value will be the speed of the rotation.
setting Key: rotatex Value: 1 will make it rotate around x axis very slow
setting Key: rotatey Value: 360 will make it rotate around y axis very fast.
You can use several rotation axis at the same time (try setting two axis to the same func_ and you will see what happens)
As mentioned earlier the not_player box must be checked or else it will stopp (when a player presses use). Unfortunatly it seems as you can't set "dmg" also, that makes it stop (when a player is hurt).
MAKE sure you keep on reading after the picture
[img]http://w1.261.telia.com/~u26123487/rotatepic.jpg[/img]
Make things rotate using textures and shaders
After finding out about rotating using the func_rotating_door I was thinking about the hinged door thing. Sent a PM to Balr14 asking if he knew something about settings for the func. In the reply he mentioned that using rotation with shaders gives better preformance! (he's a preformance guy). Then I remembered a fan texture from WolfSDK and I thought why not give it a try....never thought I would get it to work since I'm no scripter.
Well now I'm presenting a rotating fan texture, I got it to work by copy the tga and the script from WolfSDK. This will not be the same thing as rotating brushes but you could use this for some nice visual effects. I'm only introducing this to mohaa community with this post, it's all up to you scripters to make some more out of this. I have a project for you to start with. If you go into my testmap "TheStormShaderFan.bsp" that will be under maps/dm you will notice two fans with different rotation speed. There is actually a third fan in the map but it's not visible, the texture won't work with a brushside facing north or south (needs to be fixed).
Thanks balr14 for giving me this idea!
Here is a link to my[url=http://w1.261.telia.com/~u26123487/TheStormShaderFan.pk3:3ac94]TheStormShaderFan.pk3[/url:3ac94] file!
(I know that sometimes when you download a pk3 it is renamed to zip, then just rename it again before you start mohaa or the editor).
It has the following:
/tutorialrotate.map (mapfile so you can look at it in the editor)
/maps/dm/TheStormShaderFan.bsp (look in mohaa)
/scripts/TheStorm.shader (shader for textures/TheStorm)
/textures/TheStorm/fanspeed256.tga
/textures/TheStorm/fanspeed500.tga
Screenshot (ofcourse not rotating)
[img]http://w1.261.telia.com/~u26123487/shaderfan.jpg[/img]
|