Jump to content
PSYKO_nz

create a new objective when the player sees an object

Recommended Posts

12 minutes ago, Melody_Mike said:

I have used this script in my own mission, and am thankful it exists!

Have a technical question on how it works-
Because I couldn't get it to work with a texture object. Only "physics" rendered ones. Is there any reason why lineIntersectsSurfaces wouldn't work with texture objects?

My code is simplified with cursorObject. This works with many edited or terrain objects.

The lineIntersectsSurfaces works wit LODs. It's better if you want a specific point of intersect ... that doesn't matter here, especially if you aim to destroy the object.

 

So, what do you mean by texture object? Do you have a class name?

 

Share this post


Link to post
Share on other sites

Ah, let me give context:

My mission has players investigating a crash site. They are supposed to find some blood on a tree. I simply placed a "user texture 1x1" object (classname: UserTexture1m_F ). Here's a picture:
https://ibb.co/6NZ6fyF
(Note: the texture itself is a placeholder)

Since I am not interested in destroying the object, and I do want players looking at something in particular, I understand that I should use lineIntersectsSurfaces, yes? 

Share this post


Link to post
Share on other sites

I will admit it's a pain in the behind finding an object to call HOOKDEVICE (with LODs) that has a hiddenselection (so I can turn it invisible) that I can place behind my user texture. Anyone have a suggestion? 
Edit: answer is "VR objects".

Share this post


Link to post
Share on other sites

Play with:

- the distance between player and your texture;

- add a "cone of visibility" returning true

getCameraViewDirection player vectordotProduct vectorNormalized (getpos hookdevice vectordiff getpos player) > 0.95

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×