Author Topic: The Great Perciever  (Read 584 times)

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
The Great Perciever
« on: December 24, 2015, 05:05:59 pm »


               

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



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
The Great Perciever
« Reply #1 on: December 24, 2015, 05:57:59 pm »


               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.
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
The Great Perciever
« Reply #2 on: December 24, 2015, 06:23:44 pm »


               

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



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
The Great Perciever
« Reply #3 on: December 24, 2015, 07:11:30 pm »


               

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


 


TR



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
The Great Perciever
« Reply #4 on: December 24, 2015, 11:16:04 pm »


               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).
               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
The Great Perciever
« Reply #5 on: December 25, 2015, 01:02:23 am »


               

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