Creating a rotating portalgun: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 16: Line 16:
4 to 32 sq, height 55 -- nodraw texture
4 to 32 sq, height 55 -- nodraw texture


==Moving etc.==
==Moving==


[[Image:Picture_01.jpg|right|thumb|Illustration 1.]]
[[Image:Picture_01.jpg|right|thumb|Illustration 1.]]
Line 23: Line 23:
Center 1st brush, that 32x32, with stand_top_model, Z axis to half of stand_top_model (approximately).
Center 1st brush, that 32x32, with stand_top_model, Z axis to half of stand_top_model (approximately).
And move 2nd brush as on picture.
And move 2nd brush as on picture.
==PortalGun==
Create new entity, weapon_portalgun and name it weapon_portalgun.
Move it exactly to top of stand_top_model, a front part of portalgun has to be on left when you’re loking on stand_top_model from that part with 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:
::{|
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
| [[Image:Io11.png]] || OnTimer || stand_func_rotating || Start || <none> || 0.00 || No
|-
| [[Image:Io11.png]] || OnTimer || stand_func_rotating || Stop || <none> || 3.00 || No
|-
| [[Image:Io11.png]] || OnTimer || weapon_portalgun || FirePortal1 || <none> || 3.00 || No
|}

Revision as of 10:17, 5 January 2008

Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

Introduction

So, we are going to create rotating stand with portalgun shooting portals.

Prepare models

You will need:

prop_dynamic -- models/props/pedestal_base_reference.mdl -- name: stand_bottom_model prop_dynamic -- models/props/pedestal_center_reference.mdl -- name: stand_top_model Just create and name them, we will move them after next step

Prepare brushes

Create:

32 to 32 square, height 4 -- nodraw texture 4 to 32 sq, height 55 -- nodraw texture

Moving

Illustration 1.

Move stand_bottom_model where you want to have the stand, that small doors on it have to be under ground. Then move stand_top_model above stand_bottom_model, as on picture //soon// . Center 1st brush, that 32x32, with stand_top_model, Z axis to half of stand_top_model (approximately). And move 2nd brush as on picture.

PortalGun

Create new entity, weapon_portalgun and name it weapon_portalgun. Move it exactly to top of stand_top_model, a front part of portalgun has to be on left when you’re loking on stand_top_model from that part with 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:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTimer stand_func_rotating Start <none> 0.00 No
Io11.png OnTimer stand_func_rotating Stop <none> 3.00 No
Io11.png OnTimer weapon_portalgun FirePortal1 <none> 3.00 No