# Expression 2 Help

I’m just learning expression 2, and I think I’ve got the basics (somewhat) down, but what I want to do is rather complicated. I’d like to make a holographic sphere appear in front of the expression chip. I also want to be able to change how far it is from the chip easily (press one button to make it scroll forward and another to make it scroll back) and output that point in (world) XYZ coordinates. Sorry if it sounds like I want you to do all of the work. I really just have no clue and Google isn’t helping. If you could explain it that would be much better than just doing it.

Also, if you’re wondering why I posted here, it’s because this place is full of E2 junkies, and as far as I can tell the help forum isn’t. Also, I promise one hell of a contraption once this is done.

Post on the wiremod help forums, not here.

Try youtube as well. I typed “wiremod expression 2 tutorial” and got a fat list of video tutorials. Please post in wiremod forums next time for wiremod help.

Well, after a full day I can say I now understand expression 2. However, I have one problem. When I turn my chip 45 degrees, the hologram moves 90 degrees instead of the 45 I expect. Can anyone solve this?

``````
@name Hologram Transporter
@inputs Scrollforward Scrollbackward
@outputs X Y Z Distance

interval(10)

#Variables
Chippos=entity():pos()
Scroll=Scrollforward-Scrollbackward

#Scrolling Distance
if(first() | duped()) {Distance=100} #Sets beginning distance
if(Scroll!=0) {Distance+Scroll} #Scrolls once per tick

#Distance Limits
if(Distance==5001) {Distance=5000}
if(Distance==-1) {Distance=0}

#Teleport Point
Telepoint=entity():toWorld(entity():forward()*Distance)

#Preview Hologram
if(first() | duped())
{
holoCreate(1)
holoModel(1, "sphere")
holoColor(1,vec(0,0,255))
}
holoPos(1,Telepoint)

``````

[editline]10:12PM[/editline]

Nevermind. I got it thanks to some guy on my server. Still don’t know why that didn’t work, though.

You should parent the hologram to the chip. That’s my guess anyway.

It’s alright. I got it thanks to using a vector of (1,0,0) instead of forward (as well as a few other tweaks throughout the code). It works perfectly now.