Jump to content

Marker that follows crosshair


cikada11

Recommended Posts

Hey, I've been working on a mod for a while now and I am not really anyhow new to scripting in GECK by any means but I just can't figure out how to do this one thing.

 

One of the features is abbility to place an object like a furniture in a similar style like wasteland defense does. Where you have a floating marker that follows your crosshair and you can scale rotate the object then place it.

 

I've found a script template that might do something like that but I just don't know how to altogether implement it into the game or what some of that stuff even means. If you know how I can do this or have any suggestions let me know.

 

The script I found:

 

float xang
float zang
float x
float y
float z
float playerheight
float lont

begin gamemode

set xang to player.getangle x
set zang to player.getangle z * -1 + 90

if xang <= 5
set lont to 1300; you can change this value if you need to
else
if player.issneaking == 0
set playerheight to 322
else
set playerheight to 252
endif
set lont to (playerheight*cos xang/sin xang * 0.34118010537042257764)
endif

set xang to player.getangle x * -1

set x to lont * cos xang * cos zang
set y to lont * cos xang * sin zang

Activator.moveto player x y 0

end

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...