Combat Trigger help

  • Apocmud.org
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
2 months 1 week ago #8410 by Apocmud.org
Combat Trigger help was created by Apocmud.org
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:
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.

  • Apocmud.org
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
2 months 5 days ago #8411 by Apocmud.org
Replied by Apocmud.org on topic Combat Trigger help
Solved:
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
3 weeks 6 days ago #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

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

Time to create page: 1.096 seconds