- Posts: 12
- Thank you received: 0
Checking character has high enough skill level: %actor.skill(backstab)% ?
- Kay
-
Topic Author
- Offline
- New Member
-
Less
More
3 years 3 months ago #8318
by Kay
Checking character has high enough skill level: %actor.skill(backstab)% ? was created by Kay
www.tbamud.com/forum/3-building/3772-tri...day-actor-variables#
Using that as a reference, I am making a trigger that checks/works only if you have an equal to or higher level in a certain skill.
example (this doesn't work):
Using that as a reference, I am making a trigger that checks/works only if you have an equal to or higher level in a certain skill.
example (this doesn't work):
if %actor.skill(backstab > 60)%
* Fires if char's skill level is 61 or higher
%echo% Trigger works
elseif %actor.skill(backstab < 60)%
* Fires if char's skill level is 59 or lower
%echo% Trigger works
Please Log in or Create an account to join the conversation.
- lacrc
-
- Offline
- Senior Member
-
Less
More
- Posts: 53
- Thank you received: 26
3 years 3 months ago - 3 years 3 months ago #8319
by lacrc
Replied by lacrc on topic Checking character has high enough skill level: %actor.skill(backstab)% ?
Have you tried taking the comparison out of the variable?
Example:
I haven't tested this but I think the skill() function should be used as %actor.skill(skillname)% and then it will return the amount of practice a player has in the skill passed along in parenthesis.
In your case I think the mud is looking for the "backstab > 60" skill, returning "unknown skill", and not working as expected.
For testing sake you can try:And see what it'll print out.
Hope it helps!
Example:
if %actor.skill(backstab)% > 60
I haven't tested this but I think the skill() function should be used as %actor.skill(skillname)% and then it will return the amount of practice a player has in the skill passed along in parenthesis.
In your case I think the mud is looking for the "backstab > 60" skill, returning "unknown skill", and not working as expected.
For testing sake you can try:
%echo% Backstab: %actor.skill(backstab > 60)%
Hope it helps!
Last edit: 3 years 3 months ago by lacrc.
Please Log in or Create an account to join the conversation.
Time to create page: 0.077 seconds