[quote=“Weyrling, post:4, topic:1149”][quote=“drake1storm, post:3, topic:1149”]keys.clear();
id++;
keys.push_back("tape_trap");
traps.push_back(new trap(id, "TAPETRAP", "tape trap", c_dkgray, '_', 1, 6,
0, &trapfunc::tape, &trapfuncm::tape, keys));;
[code]void trapfunc::tape(game *g, int x, int y)
{
g->add_msg(“You get tangled in tape!”);
g->u.moves -=150;
}
void trapfuncm::tape(game *g, monster *z, int x, int y)
{
if (g->u_see(z))
g->add_msg(“The %s gets tangled in tape!”, z->name().c_str());
z->moves -= 150;
}[/code][/quote]
I added your tape functions to trap.h and trapfuncs.cpp, and then applied them to the bubblewrap in trapdef.cpp. I spawned in a Zombie Brute and it sent the correct “tangled in tape” message and slowed it down a turn or so.
I’m not familiar enough with CDDA to figure out how the adding of stuff works yet, I’m guessing you failed to initialize/include something, somewhere.[/quote]
So it works with bubblewrap, eh?
Hmm, give me a minute. I might be able to fix this if that is true.