Holo Helix

From GMod Wiki

Revision as of 13:23, 16 November 2011 by [RV] TJjokerR (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Deletion.pngThis page has been nominated for deletion. Deletion is due within approximately 30 days from nomination, unless the deletion has been disputed on the talk page. See more pages nominated for deletion here.
Reason for deletion: Not what Garry wants the wiki to be used for
Last Edit was made on 11/16/2011



Contents

Holo Double Helix

Holo Helix: Holo Double Helix
Page white text.png Description:Creates a DNA-ish hologram around the player of your choice.
link=User:Entoros Original Author:Entoros
Calendar.png Created:February 1, 2009
Page white text.png Notes:Nothing, really.


Getting the Parts

To start out, let's get everything together first. Just a note; because I really don't want to take the time to lay everything out in gates, it's all packed into Expression 2. Sorry; I'll get to it eventually, and it'll be explained at the end.

What the setup looks like.
  1. Spawn something to place all of this on, like a 1x1 PHX plate.
  2. Spawn a Holo Grid on the plate.
  3. Spawn two Holo emitters with different colors, uncheck show beam, point size around 3, and client FadeRate of 50.
  4. Spawn a Wired Numpad with Value On of 1, Value Off of 0, and check Toggle.
  5. Spawn an Expression 2 chip with the following code:
@name Holo Helix
@inputs 
@outputs X Y Z X2 Y2 Z2 FadeRate 
@persist Player:entity Time 
Player = findPlayerByName("YOUR NAME HERE")
X = sin(Time*180)*20 + Player:pos():x()
Y = cos(Time*180)*20 + Player:pos():y()
Z = cosr(Time)*35 + 35 + Player:pos():z()
X2 = sin(Time*180 + 180)*20 + Player:pos():x()
Y2 = cos(Time*180 + 180)*20 + Player:pos():y()
Z2 = Z      
FadeRate = 50
interval(20)
Time += 0.02

Wiring the Components

Most of the wiring is pretty self explanatory, but I'll walk you through just to make sure everything is wired up right.

  1. Take out the Holo Emitter tool. Right click the first holoemitter, then left click the holo grid. Do the same with the other holo emitter.
  2. Take out the Wire tool. For the first holo emitter, wire the X to the X of the Exp2, Y to the Y, Z to the Z, and FadeRate to the FadeRate.
  3. Wire the Active to the "0" of the Wire Numpad.
  4. Repeat steps 2 and 3 for the other holo emitter, except wire the X of the Holoemitter to the X2 of the Exp2, Y to Y2, and Z to Z2.
  5. Wire the "UseGPS" of the Hologrid to any of the outputs on the Exp. 2 chip.

The Finished Product

The helix in action.

Whew! Now that everything's wired up and ready to go, press "0" on your Numpad, and you should find yourself in a twisting series of holograms. Use a Camera to check yourself out.

The Explanation

The Expression uses a bit of math to figure out how to put this thing in a double helix; essentially, by doing X = sin(Time) and Y = cos(Time), it makes a circle. By doing Z = cosr(Time), it makes this circle move up and down. In the X2/Y2, by adding 180 to the sin/cos, it puts the other beam opposite the original.

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox