Welcome to the Builder Academy

Question Ideas for traps/detecting/removing

More
10 Jul 2017 12:57 - 12 Jul 2017 09:03 #6784 by JTP
Hi

Anyone who ever made a trap/detect traps/remove traps skill system ? Who wanna share how you did it, or ideas how to make it.

Maybe even with trigges, i know traps themself can be make with that. But what about detecting them and removing.

Also maybe the possibility for a ranger to set a trap.
Last edit: 12 Jul 2017 09:03 by JTP.

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

More
12 Jul 2017 11:50 #6785 by thomas

JTP wrote: Anyone who ever made a trap/detect traps/remove traps skill system ? Who wanna share how you did it, or ideas how to make it.

Maybe even with trigges, i know traps themself can be make with that. But what about detecting them and removing.

Also maybe the possibility for a ranger to set a trap.


it depends what you mean by traps. I made a system once, where you could block an exit for a short period (I think it was called spiders web or something). This was a special magic spell, which blocked the exits from the current room for one or two battle ticks. It was efficient for keeping the monsters from fleeing - in practice trapping them there.

If you are referring to creating "touch" traps, or "land mines", you could easily create an object with an "enter" trigger, that explodes/implodes/sends arrows/spikes when someone enters, damaging them. Or even put in a short delay, so they might try to disarm it. Or check their "sense trap" skill (if applicable). Or check their dexterity.

If you are referring to boobytrapping chests and the like, this would almost certainly have to be a skill/spec_proc.

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

More
12 Jul 2017 12:04 #6786 by JTP
Could an actual skill remove a room Or obj trigger, If so How ?

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

More
12 Jul 2017 12:09 - 12 Jul 2017 12:11 #6787 by JTP
And what about detecting traps ? Making the skill it self is easy, but having it tell the player when entering a room sense a trap, comming from a trigger ?
Last edit: 12 Jul 2017 12:11 by JTP.

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

More
14 Jul 2017 10:48 #6791 by thomas
As I wrote above, this would have to depend on the kind of trap you are creating.

If you are going the way of having a skill ("create trap"?) that allows you to create an object in the room, this object could have the necessary triggers to handle what you are looking for.

Let's say you have an item "fire trap" with a couple of different triggers.
An enter trigger, which checks the "detect traps" skill of the entering character and sets a variable if it is detected.
An enter trigger, which checks the variable set above. If detected, it performs a dex check or similar to see if any damage should be avoided. It sets the damage factor as a variable.
An enter trigger, which fetches the two variables above, and does the actual damage, if any. Also tells the player if he avoided damage. If the trap is triggered, remove it. If the trap is detected, leave it in the room (it might hit the next guy).
A get trigger, which again checks for the detect traps skill, and conditionally destroys the trap, if the skill is too low.

In this scenario, you can create different traps by tweaking the variables.

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

More
21 Jul 2017 20:30 - 22 Jul 2017 11:56 #6806 by JTP
Ok here goes the beginning:

i made ITEM_TRAP and skill sense trap.

then i added case ITEM_TRAP
Code:
switch (GET_OBJ_TYPE(obj)) { case ITEM_NOTE: if (obj->action_description) { char notebuf[MAX_NOTE_LENGTH + 64]; snprintf(notebuf, sizeof(notebuf), "There is something written on it:\r\n\r\n%s", obj->action_description); page_string(ch->desc, notebuf, TRUE); } else send_to_char(ch, "It's blank.\r\n"); return; case ITEM_DRINKCON: send_to_char(ch, "It looks like a drink container."); break; case ITEM_TRAP: if (GET_OBJ_TYPE(obj) == ITEM_TRAP && GET_SKILL(ch, SKILL_SENSE_TRAP > 0)) { send_to_char(ch, "You sense a trap."); } else send_to_char(ch, "You see nothing special.."); break; default: send_to_char(ch, "You see nothing special.."); break; } break; default: log("SYSERR: Bad display mode (%d) in show_obj_to_char().", mode);

ok it Works, but i would like it to also show description or extra description.

how can i do that ?

Would also be good if different skill % still had a chance to fail giving info.
Last edit: 22 Jul 2017 11:56 by JTP.

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

Time to create page: 0.199 seconds