Creating a rotating portalgun: Difference between revisions
mNo edit summary |
Darthkillyou (talk | contribs) (Quite a bit of cleanup) |
||
Line 2: | Line 2: | ||
[[Image:Picture_03.jpg|right|Width:64]] | [[Image:Picture_03.jpg|right|Width:64]] | ||
So, we are going to create rotating stand with portalgun shooting portals. | So, we are going to create rotating stand with portalgun shooting portals. | ||
An example map is available for download [http://myfreefilehosting.com/f/c28a01c6bb_0.1MB here]. | An example map is available for download [http://myfreefilehosting.com/f/c28a01c6bb_0.1MB here]. | ||
==Prepare models == | ==Prepare models == | ||
You will need: | You will need:<br><br> | ||
prop_dynamic, world model: <code>models/props/pedestal_base_reference.mdl</code>, name: <code>stand_bottom_model</code><br> | *prop_dynamic, world model: <code>models/props/pedestal_base_reference.mdl</code>, name: <code>stand_bottom_model</code> Set the "disableshadows" keyvalue to 1.<br><br> | ||
prop_dynamic, world model: <code>models/props/pedestal_center_reference.mdl</code>, name: <code>stand_top_model</code> | *prop_dynamic, world model: <code>models/props/pedestal_center_reference.mdl</code>, name: <code>stand_top_model</code> | ||
==Prepare brushes== | ==Prepare brushes== | ||
Create: | Create: | ||
32 | *32 x 32 block, height 4, using the <code>tools/nodraw</code> texture. | ||
4 | *4 x 32 block, height 55, also using the <code>nodraw</code> texture. | ||
==Moving== | ==Moving== | ||
[[Image:Picture_01.jpg|right|thumb|Illustration 1 | [[Image:Picture_01.jpg|right|thumb|Illustration 1]] | ||
Move <code>stand_bottom_model</code> where you want to have the stand | Move <code>stand_bottom_model</code> where you want to have the stand. The small doors on the bottom of the model need to be just underground.<br><br> | ||
Now move <code>stand_top_model</code> above <code>stand_bottom_model</code> as in the illustration. | |||
Center | Center the first brush that measured 32x32 with <code>stand_top_model</code>. Set its Z axis (height) to about half of <code>stand_top_model</code>. | ||
Now move the second brush as it is in the picture. | |||
==Brush Entities== | |||
Select the 32x32 brush and tie it to a <code>func_rotating</code> entity. <br> | |||
::{| | |||
! Property Name || Value | |||
|- | |||
| Name || stand_func_rotating | |||
|- | |||
| Max Rotation Speed || 30 | |||
|- | |||
| | |||
|} | |||
Under the Flags tab, uncheck <code>Start ON.</code> | |||
<br><br> | |||
Tie the second brush to a <code>func_door</code>. | |||
<br> | |||
::{| | |||
! Property Name || Value | |||
|- | |||
| Name || stand_func_door | |||
|- | |||
| Speed || 25 | |||
|- | |||
| Move direction: || 90 0 0 | |||
|} | |||
==PortalGun== | ==PortalGun== | ||
Create new entity, <code>weapon_portalgun</code> and name it weapon_portalgun. | Create a new entity, a <code>weapon_portalgun</code> and name it <code>weapon_portalgun</code>. | ||
Move it exactly | Move it exactly on top of <code>stand_top_model</code>. The portalgun should face left when you’re looking at <code>stand_top_model</code> in the direction of the blue display. | ||
==Logic== | ==Logic== | ||
Line 48: | Line 69: | ||
|} | |} | ||
Create a new output: | |||
Create new output: | |||
::{| | ::{| | ||
! || My Output || Target Entity || Target Input || Parameter || Delay || Only Once | ! || My Output || Target Entity || Target Input || Parameter || Delay || Only Once |
Revision as of 16:13, 16 January 2008
Introduction
So, we are going to create rotating stand with portalgun shooting portals.
An example map is available for download here.
Prepare models
You will need:
- prop_dynamic, world model:
models/props/pedestal_base_reference.mdl
, name:stand_bottom_model
Set the "disableshadows" keyvalue to 1. - prop_dynamic, world model:
models/props/pedestal_center_reference.mdl
, name:stand_top_model
Prepare brushes
Create:
- 32 x 32 block, height 4, using the
tools/nodraw
texture.
- 4 x 32 block, height 55, also using the
nodraw
texture.
Moving
Move stand_bottom_model
where you want to have the stand. The small doors on the bottom of the model need to be just underground.
Now move stand_top_model
above stand_bottom_model
as in the illustration.
Center the first brush that measured 32x32 with stand_top_model
. Set its Z axis (height) to about half of stand_top_model
.
Now move the second brush as it is in the picture.
Brush Entities
Select the 32x32 brush and tie it to a func_rotating
entity.
Property Name Value Name stand_func_rotating Max Rotation Speed 30
Under the Flags tab, uncheck Start ON.
Tie the second brush to a func_door
.
Property Name Value Name stand_func_door Speed 25 Move direction: 90 0 0
PortalGun
Create a new entity, a weapon_portalgun
and name it weapon_portalgun
.
Move it exactly on top of stand_top_model
. The portalgun should face left when you’re looking at stand_top_model
in the direction of the blue display.
Logic
Make entity logic_timer
named timer_stand and set interval to 5 sec. Make sure that initial state is on.
Now go to outputs and write:
Create a new output:
Now, we will make outputs of stand_bottom_model
:
And few outputs for weapon_portalgun
:
Parents and the Hole
Now, just set parent of weapon_portalgun
and stand_top_model
to stand_func_rotating
.
When your done, make hole under stand_bottom_model
s overground part.
End
You may create prop_static with model of models/props/autoportal_frame/autoportal_frame.mdl
for framing autofired portals, just move them to wall and rotate.