Welcome to the Builder Academy

Question Trigger Help - OBJ checking to see if actor has a specific follower.

More
28 Mar 2014 15:20 #4782 by Treyorn
I created a spirit guide to follow newbies around and the actor can summon and banish it at will with an orb in their inventory. The trouble I am having is how to see if the spirit is already summoned and following the actor.

Here is a basic version of the trigger for summoning:
Code:
Trigger Editor [14133] 1) Name : summon spirit 2) Intended for : Objects 3) Trigger types: Command 4) Numeric Arg : 7 5) Arguments : sum 6) Commands: if ("%arg%" == "spirit") %load% mob 14111 %force% spirit follow %actor.name% else %send% %actor% Summon who? end

I removed all of the waits and action text to simplify it for this single purpose. So big question. Can an object determine whether this spirit is already following the actor? The vnum of the spirit is 14111.

Please Log in or Create an account to join the conversation.

More
29 Mar 2014 19:23 #4788 by Parnassus
There's a variable to cover that.

help CHAR-VARS TRIGEDIT-VARIABLES-CHARACTERS
The following fields can be used with %actor%. i.e. %actor.<field>%
Excluding the subfield () returns the value. Adding a subfield adjusts it.
Field - variable returns:
follower(name) - The follower of the actor (as an id) with name supplied.

You might also consider setting a global, if the spirit is flagged nokill.
tstat 1471 for an example of a global in general, not specific to this case.
The following user(s) said Thank You: Treyorn

Please Log in or Create an account to join the conversation.

More
30 Mar 2014 14:09 - 30 Mar 2014 14:10 #4789 by Treyorn
That worked. Thanks! I wasn't sure about the (name) vs a vnum. I was trying with a vnum at first but I guess it only takes letter characters.

edit. Have some Karma and a Thank you :)
Last edit: 30 Mar 2014 14:10 by Treyorn.

Please Log in or Create an account to join the conversation.

Time to create page: 0.180 seconds