Jump to content


Photo

Detect([PC])


3 replies to this topic

#1 Idobek

Idobek

    Dust Bunny

  • Retired Gibberlings
  • 1001 posts
  • Gender:Male
  • Location:England

Posted 08 January 2006 - 06:16 AM

Would Detect([PC]) trigger on the PC only or anyone in the party? I hate to go with the obvious where the Infinity Engine is concerned?
Did you know G3 has secret forum rules?
Yep. They're generally of the nature 'don't annoy Idobek.'

#2 SimDing0

SimDing0

    Extremely cute and fluffy and lovely.

  • Fixpackers
  • 1319 posts
  • Gender:Male

Posted 08 January 2006 - 06:23 AM

Anyone in the party.

#3 Avenger

Avenger
  • Modders
  • 3789 posts
  • Gender:Male
  • Location:Hungary

Posted 08 January 2006 - 12:58 PM

Let me cut in an ask, what is the difference between
Detect([pc])
and
See([pc]) ?

Does See handle seeing distance but Detect doesn't?

What is the difference if the script is running in a proximity trigger (which has no seeing distance)

#4 devSin

devSin
  • Fixpackers
  • 3017 posts
  • Gender:Male

Posted 08 January 2006 - 02:37 PM

Detect should be like a See/Hear combo. I think the only real effect is that it doesn't fail if a creature is hidden. I imagine the behavior is identical, regardless of the object running the script (although, I think that all objects actually do have a visual range). Both should only work if the object is in visual range. As far as I understand, Detect() is short and simple for InVisualRange() && !ProtectionFromCreatureType(ME).

Since we're talking [PC], note that it's "sticky" (like LastSeenBy), and you can use [PC] after calling Detect([PC]) (e.g., in IF Detect([2]) Range([2],10) Name([2],"Avenger") THEN DisplayString([2]) Spell([2],2112) Wait(1) Kill([2]) END, [PC] for all the actions should, assuming I'm not just making this up, always target the Detect()ed object). Good for some things, but makes it a bit difficult to switch targeting to another PC with such a generic argument (as far as I could tell, the engine doesn't waste time finding a new [PC] if the previous [PC] target is still valid).

Edited by devSin, 08 January 2006 - 02:40 PM.




Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users