HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - shaunb81

Pages: [1]
Thank you.  We have not yet started our targeting system but will keep this in mind.

If anyone was curious about LoS, the $LoSTracker system node is fairly easy to use although does not seem to be documented in the WIKI.

You can put in a LoS request via the $LosTracker._RequestLOSCheck method.  For first initial LoS testing, I just put the method call in our game specific CommonCharacter class in a CheckLoS method that looks like this.

Code: [Select]
method checkLoS()
  tList as List of NodeRef
  add back MiscUtils:ClientToServerNode( me.getMyAccount().GetClickTarget()) to tList
  $LosTracker._RequestLOSCheck(me, tList, me)

Whichever class you specify as the callback node has to implement the following shared function.

Code: [Select]
shared function _LoSResults(handler as NodeRef, request as ID, source as ID, results as LookupList indexed by ID of Boolean)
I also found the command would always return true until I implemented the following method in the CommonCharacter.

Code: [Select]
method _GetLOSPosition() as Vector3
Which just returns me.getPosition() + "0,.2,0"

the .2 will require tuning as without it, you are checking LOS from the source CommonCharacter's feet to the target CommonCharacter's feet.


I was wondering what the suggested functions were for both server and client side LoS checks as well as what functions for raycasting.

Basically we want to ensure a character has LoS with the target before it can use abilities on it.  Will the GetTargetsInCone, etc functions work for this?  I notice the documentation says "Visible targets."  Does that mean a visible property, or visible as in visible from the origin point specified when calling the GetTarget function?  Will terrain and other objects block targets from showing up in the returned results?

Next, after we determine the character has LoS to the target, we want to use Raycasting from the character to the target and determine if there are any objects inbetween that will act as cover and absorb the attack.  I saw at least one raycasting related function/method, and was curious if this or any other function will be able to assist us in this check.

Finally, slightly off topic, but we noticed with Seamless Worlds that while you can see characters on a linked area, you cannot target them with the default world.  Is this something that can be fixed and addressed in scripting, so that we can eventually aquire targets and use abilities on them across linked areas?

Thank you

Pages: [1]