TargetCoordinates - realm

Archive of the older Feature Request Forum Posts

Moderator: POL Developer

Locked
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

TargetCoordinates - realm

Post by OldnGrey »

Please add realm to the return structure for TargetCoordinates.
In fact I would love to see this make it into 096.1 too.
FreeSoul
Master Poster
Posts: 90
Joined: Sat Feb 04, 2006 9:14 am
Location: Aman

Post by FreeSoul »

but isn't enough to check the someone.realm who is targetting a location?
you can't target different realm from anotherone
DevGIB
Grandmaster Poster
Posts: 248
Joined: Mon Feb 06, 2006 6:12 am

Post by DevGIB »

it would make scripts alot neater and less effort required if you could just get a realm from a target or targetcoords.
FreeSoul
Master Poster
Posts: 90
Joined: Sat Feb 04, 2006 9:14 am
Location: Aman

Post by FreeSoul »

from target - no problem you have objectref as return so it has .realm
targetcoords - as above
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Sure you can code around it, but it would be really handy if TargetCoordinates returned the realm in the structure.

And my best reason to want it is because you can then go targ.realm with confidence -
eg
var targ := MyFunction(character);
CreateItemAtLocation(targ.x, targ.y, targ.z, theItem, 1, targ.realm);

No matter where 'targ' came from inside MyFunction you could be confident it had .realm. At the moment I have to be extremely careful to work out whether something has a .realm property in each and every case like this example. MyFunction may be anything not just TargetCoordinates. Having a .realm parameter is not essential, just very nice to have.

Alright even if you're not convinced, how about putting it in as a favour, huh?
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko »

Returning a 'realm' reference in the TargetCoordinates function is poor logic since coordinates are not POL Class Objects and only objects can have a realm member. I agree with Freesoul. The just use the realm of 'who' in the TargetCoordinates for a realm reference.
Marilla

Post by Marilla »

Who says only objects can have a .realm member?

Code: Select all

var s := struct;
s.+realm := REALM_BRITANNIA;
You could argue, "only objects can have an X or Y member, too... and I'd be equally as confused why you could say that, since the struct returned by TargetCoordinates() has those.


I agree that it's fairly easy to script around this one in most cases, by just taking the realm of the PC that was given the target, but I think it would also be nice for the TargetCoordinates() function itself to simply add that to the struct it returns... even if all it does is copies the .realm property from the mobile that used the target.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Adam and I talked about it in IRC and yeah, we'll add a .realm property to it which is a copy of the person who did the targetting.
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

Post by MuadDib »

-- POL096.1 --
06-27-06 MuadDib
Added : Realm property to return struct of TargetCoordinates() function. This
is based off the targeter's realm. Never trust information returned
by the client for stuff like this.

06-24-06 MuadDib
Changed : Offline mobiles can once again be targeted without problems.
Locked