Jump to content

GECK function to create a marker by script? or get player position?


Recommended Posts

Posted (edited)

I'm trying to use CreateDetectionEvent which takes a location parameter. I either need a function that gets the position of the player, or a function by which I can use PlaceAtMe in conjunction with a function that creates a marker.

e.g.

ref rPlayerPosition

set rPlayerPositionMarker to Player.PlaceAtMe XMarker

this is the syntax for createdetectionevent:

[LocationREF].CreateDetectionEvent OwnerRefID:ref iSoundLevel:int{0-100} EventType:int{0-3}

I want to force an NPC to detect the player so I was using:

player.CreateDetectionEvent player 100 0
if GetDetected player == 1
   StartCombat player
endif

I'm not sure if I can pass 'player' as a location ref. I was going to use GetPos but it looks like it only returns x,y, or z, and I'm assuming the location ref parameter for createdetectionevent is expecting x, y, and z. Any insights are appreciated.

Edited by irswat
Posted

(See my reply to your other post regarding CreateDetectionEvent)

 

 

  On 3/17/2014 at 5:32 AM, irswat said:

I'm not sure if I can pass 'player' as a location ref.

You can.

  • Recently Browsing   0 members

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