Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

GetPOS function


DsoS
 Share

Recommended Posts

How would I setup a script to check an objects Z position?

I already have the main script created, but the CK wiki wasn't any help in the GetPOS Z area.

What I need to happen is something like this...

if GetPOS Z (-288.0000)

	Do This!

EndIf
Any ideas, as this is a critical part of this script. Thank You, DSoS ========================================= EDIT: I was looking/using the wrong function. The correct function is GetPosition Z. Solution (With many thanks to WillieSea!):
if MyObjectREF.GetPositionZ() == -96

	;Do something

EndIf

This should also work with the X and Y positions as well.

Also no Variables will have to be called on while using this, (That I can tell, I always list "import debug" and "import utility" up at the top for wait and other stuff!)

Thank You WillieSea :pints:

Edited by DsoS
Link to comment
Share on other sites

Would something like this work?



Float Function GetPositionZ() native


    If MyREF.GetPositionZ() == -96.0000

        ;Do Stuff

    endif


	If My2REF.GetPositionZ == -64.0000

		;Do This

	Endif

Nope didn't work :(

Note to Self... Play steam sound at Pipe caps instead of the XMarkers.

Edited by DsoS
Link to comment
Share on other sites

OnTriggerEnter executes one time.

OnTriggerLeave executes one time.

OnTrigger will occassionally execute if the activator remains in the trigger zone. If your going to constantly check the position of the objects, you might want to use this and make the trigger zone rather large.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...