Welcome to the Builder Academy

Question Combat Trigger help

More
07 Jul 2019 05:23 #8410 by Nero
Combat Trigger help was created by Nero
The scenario is that I want a mob to be able to bash someone into another room, I however don't want that to be possible if the door to that room is closed. Right now with my current setup, it will bash them (%teleport%) them into the room regardless if the door is open or closed. I have tried to do a eval room but it's not working and crashing the game:
Code:
eval target %room.west% if %room.west(DOOR)% if %actor.affect(CHARM)% %send% %actor% Roland bashes you with his shield, sending you flying. %echoaround% %actor% Roland bashes %actor.name% and sends %self.himher% flying. %teleport% %actor% 979 break end eval target %room.west% if %room.west(DOOR)% if !%actor.affect(CHARM)% %send% %actor% Roland bashes you with his shield, sending you flying. %echoaround% %actor% Roland bashes %actor.name% and sends %self.himher% flying. %teleport% %actor% 979 %force% %actor% look %send% %actor% You land into the room with a thud. %echoaround% %actor% %actor.name% comes flying into the room and lands with a thud. break end eval target %room.west% if %room.west(DOOR CLOSED)% dg_cast bash %send% %actor% Roland bashes you with his shield, sending you flying. %echoaround% %actor% Roland bashes %actor.name% and sends %self.himher% flying. break end default break done set already_fighting 1 global already_fighting end

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

More
09 Jul 2019 23:12 #8411 by Nero
Replied by Nero on topic Combat Trigger help
Solved:
Code:
eval room %self.room% eval doorcheck %room.west% %send% %actor% Roland bashes you with his shield, sending you flying. %echoaround% %actor% Roland bashes %actor.name% and sends %self.himher% flying. if ((%doorcheck% /= DOOR) && (%doorcheck% /= CLOSED)) bash %actor.name% else %teleport% %actor% 979 %force% %actor% look %send% %actor% You land into the room with a thud. %actor.pos(sit)% %echoaround% %actor% %actor.name% comes flying into the room and lands with a thud. end default break done set already_fighting 1 global already_fighting end
The following user(s) said Thank You: thomas

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

More
18 Aug 2019 20:16 #8427 by Rumble
Replied by Rumble on topic Combat Trigger help
A great trigger and example for others. Thanks for sharing.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

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

Time to create page: 0.171 seconds