Welcome to the Builder Academy

Question if check help

More
06 Dec 2017 11:32 - 06 Dec 2017 11:33 #7210 by JTP
if check help was created by JTP
Hi

How will an if check look like to prevent usage of a skill, if im grouped with the victim ?
Both if im the leader or just a member when im using the skill.

Iwe made a befriend skill, and atm i can befriend someone that im grouped with. Result that the char joins the group again and group info lists the char twice.
Last edit: 06 Dec 2017 11:33 by JTP.

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

More
06 Dec 2017 20:36 - 06 Dec 2017 20:37 #7211 by thomas
Replied by thomas on topic if check help
Code:
if ( GROUP(ch) && GROUP(vict) && ( (ch->master && ch->master == vict) || (vict->master && vict->master == ch) ) ) { // both are grouped with each other }

edit: var names mismatched
Last edit: 06 Dec 2017 20:37 by thomas.

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

More
06 Dec 2017 22:17 #7212 by JTP
Replied by JTP on topic if check help
Thanks alot, that worked.

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

Time to create page: 0.430 seconds