What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

GameObject.IsVisible

RahlRB

New Member
Joined
Sep 24, 2015
Messages
20
Reaction score
2
Mastahg,

Can you give a little more detail on exactly what GameObject.IsVisible is supposed to tell us?

Specific questions that come to mind:
  • Does this check Line of Sight?
  • Does this check for things that are actually able to be seen within the game?
    • For example, would this return true on a mob that was locked behind a door?

For a little more context of what I'm looking for:

I'm looking at putting together a nice way of finding an enemy to target around me.

This is the code I have for searching for suitable targets:
Code:
var enemies = GameObjectManager.GetObjectsOfType<BattleCharacter>().Where(x => x.IsValid && x.IsVisible && x.IsAlive && x.IsTargetable && x.CanAttack);

I'm trying to determine if there are other filters I should add or if there are filters I should remove.

Thanks!
 
IsVisible checks if the object is invisible.
 
It's pretty useful for checking for timed nodes / ephemeral nodes
e.g. I use something like this as my conditional:

"Condition.IsTimeBetween(&NodeTime;) and GameObjectManager.GetObjectByObjectId(&NodeId;) and GameObjectManager.GetObjectByObjectId(&NodeId;).IsVisible"
 
It's pretty useful for checking for timed nodes / ephemeral nodes
e.g. I use something like this as my conditional:

"Condition.IsTimeBetween(&NodeTime;) and GameObjectManager.GetObjectByObjectId(&NodeId;) and GameObjectManager.GetObjectByObjectId(&NodeId;).IsVisible"

You should be using npcid. Objectids will change on zone.,restart, death, out ranging it, etc.
 
Back
Top