Welcome to the Builder Academy

Question Is char.race depreciated? And other questions related to the char variable.

More
19 Jul 2017 07:57 #6803 by Aalan
Hello all. :)

Ok, so I have been beating my head against the wall trying to figure this out. What I am trying to do is an ifcheck that looks at the character's race to determine which of several paths are possible.
Code:
if %actor.is_pc% if %char.race%=='Human' nop stuff for humans elseif %char.race%=='Droid'||'Recon Droid'||et. all... droids nop stuff for droids else *Any alien races nop stuff for aliens if %char.sex%==female && %char.cha%>12 nop greasy slimeball comment end end

Am I using the argument incorrectly? Should it be used as %char.race%(Human) (Just thought of that... will be trying it shortly) or is it truly gone? If it is gone, how do I properly use the %actor.varexists(var)%? I always get a null when trying to use that... I know I will need to figure out how to use that so I can pull the Faction a character belongs to in order to bring the experience more to life.

Appreciate the help!

Aalan - Builder/Coder for d20MUD.com

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

More
19 Jul 2017 08:02 - 19 Jul 2017 08:13 #6804 by Aalan
Ok, so char.race is not depreciated!!! Yea!!! That is a good thing... So we can disregard that section. I need to know about strings that are not part of the codebase like Faction, accexp, artisan level, etc... how do I search and append it to the variable so I can make this a more interactive experience?

For the record for those wondering the same thing, the proper syntax for using char.race is:

%char.race%(Race Name)


EDIT: So the information above is correct... but... I am getting a positive hit for race, no matter which race it is and the actor is not... For example. I am using a Recon Droid. If my string shows 'if %char.race%(Human)' I still get a positive result even though I am a Recon Droid... will continue playing with it.
Last edit: 19 Jul 2017 08:13 by Aalan. Reason: hmmm mistake somehow

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

More
20 Jul 2017 16:18 #6805 by Aalan
Issue was it was not implemented on our version. It has been added. :) Same with a few of the other variables I was looking for.


Thanks all!
The following user(s) said Thank You: thomas

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

Time to create page: 0.170 seconds