Traps

is there a way to make a trap for the player? As in have the player walk onto the trap and an arrow will shoot out of a hole in the wall?

------------------
Thanks,
GrahamVH
graham@vhpublications.com

Quote

Originally posted by GrahamVH:
is there a way to make a trap for the player? As in have the player walk onto the trap and an arrow will shoot out of a hole in the wall?

Sure, a couple of ways. Both involve having an event that is attached to the tile that serves as the "trap." Ie, player walks on the tile and the event fires off...

One way would be to create an animation as a series of stamps which you add and remove quickly to simulate movement towards the player with the last one striking the player and then doing damage. The good part about this is that the arrow will always hit the player(assuming you lock the player and play a fast animation) and damage will occur. The bad part is that the arrow will always hit the player.

Another way would be to create an invisible NPC and give it a ranged item that shoots an arrow animation. Place him in the wall and have him fire at the player, then delete him(assuming it is a one shot wonder). This is probably the best shot.

Another way would be to create an NPC that IS the arrow. Ie, give his animation that of an arrow, and set him to try to reach the player. This would make a "heat seaking missile," so to speak. And when it reaches the player delete him and deal damage.

Hopefully one of these will work for you.

------------------
(url="http://"http://stark.evula.net/pogwalkthrough.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://stark.evula.net/plugins/dev_tools.htm")PoG Dev Tools(/url) | (url="http://"http://stark.evula.net/plugins/spells_expander.htm")Spells Expander(/url)
(url="http://"http://stark.evula.net")Stark.evula.net(/url) | (url="http://"http://www.evula.net")EVula.net(/url) | (url="http://"http://mail.ambrosiasw.com/mailman/listinfo/coldstone_dev")Coldstone-dev mailing list(/url)