View Full Version : Help understanding rtarget
BasicDonut101
July 20th, 2022, 01:03
is it theoretically possible to get an attribute from a character using rTarget and put the value somewhere on CT panel. My ruleset uses Damage Resistance in percentage, i want to automate resistances. Example: player dealts 100 fire dmg, the npc has %25 fire resistance, dmg dealt is 75
bayne7400
July 20th, 2022, 01:37
Yes you can grab the node from rTarget you can use ActorManager from core or DB.findNode(rTarget.sCTNode);
Moon Wizard
July 20th, 2022, 02:48
Please use the ActorManager functions to get the data nodes (i.e. do not use the attached variables).
For example, to get the underlying creature node, use ActorManager.getCreatureNode(rTarget), which will return the top-level database node of the NPC or PC record.
You can use ActorManager.getRecordType(rTarget) to figure out what kind of record the actor is. (i.e. "charsheet" = PC, "npc" = NPC, etc.)
Regards,
JPG
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.