irswat Posted March 17, 2014 Share Posted March 17, 2014 (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 March 17, 2014 by irswat Link to comment Share on other sites More sharing options...
jazzisparis Posted March 17, 2014 Share Posted March 17, 2014 (See my reply to your other post regarding CreateDetectionEvent) I'm not sure if I can pass 'player' as a location ref.You can. Link to comment Share on other sites More sharing options...
Recommended Posts