Aller au contenu

Photo

The Great Perciever


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Tarot Redhand

Tarot Redhand
  • Members
  • 2 679 messages

As placeables do not have the OnPerceived event I was wondering if this is possible. A very simple creature. It does not move, it has no attacks, bones or animations. In fact the maodel I am thinking of is a 10cm square plane with a fully transparent texture. Its just rests on the ground and does nothing but perceive. That way it can be placed directly under the placeable to give the illusion that the placeable can perceive its surroundings.

 

Or do I go back to having to use a trigger to fake it?

 

TR



#2
Proleric

Proleric
  • Members
  • 2 352 messages
Exact placement is only possible if the placeable has no walkmesh. Creatures can only spawn at walkable locations, period.

Any existing invisible creature will do, preferably with the cutscene ghost effect, which allows other creatures to walk through it.

Bear in mind that perception range derives from the ranges 2da and the creature template setting refering to it - the size of the creature doesn't matter.

If the placeable is in a fixed location, a trigger would do a slightly better job, because it fires instantly, whereas perception lags.

#3
ShadowM

ShadowM
  • Members
  • 768 messages

Put a AOE on/near the placeable and run you perceived script through on enter event.



#4
Tarot Redhand

Tarot Redhand
  • Members
  • 2 679 messages

The thing is I need to be able to detect if the PC is invisible or not.

 

TR



#5
Proleric

Proleric
  • Members
  • 2 352 messages
In that case, I can see why a creature appeals, because OnPerception is the only event that fires when a PC suddenly becomes visible within range (as a result, say, of cancelling stealth or an invisibility spell).

If the placeable is unwalkable and blocks line-of-sight, you might need two or more invisible creatures on its periphery to monitor all approaches. The perception range (measured from the placeable's centre) will then be a little greater than normal, but maybe no big deal. If you test by having a PC run at the creature, you'll find that the point at which the PC is noticed is variable anyway, owing to AI lag.

An alternative I've used successfully in SP is a one-second psuedo-heartbeat. Set a flag on entry to a trigger and clear it on exit. Each second, if the flag is set, check the PC. I use this to check for detect mode, but you could equally check for stealth and GetHasEffect (which might be EffectVisibility or VFX cutscene invisibility).
  • Tarot Redhand aime ceci

#6
Tarot Redhand

Tarot Redhand
  • Members
  • 2 679 messages

As I was planning on a one (or maybe half) second pseudo heartbeat anyway so that seems like a very good suggestion from my point of view. Thanks. Mind you, as it is now just after 1am on Christmas morning as I type this in the UK, it might be a while before you actually see what I am planning.

 

Thanks and Merry Christmas morn.

 

TR