I have a regular say verb that allows players to hear messages throughout the game. However, how would i code it so that if a mob is hit with a certain attack, such as "Sound Blast", the mob would become temporarily "deaf", and not be able to see the messages others say to the world for a short period of time? Also, how would i also add it so that after a short period of time, the mob begins to be able to see fragments of sentences others type, yet not the full thing?
--Reinhart
ID:170147
Mar 16 2005, 3:42 pm
|
|
This snippet may be more complex than you are looking for, but it models sound pretty realistically and minces messages that players can not hear at 100%. The perception comments in the communication verbs are for players with hear_mod = 1, the default value.
To make players completely deaf, set hear_mod = 0. Partially deaf players have a hear mod between 0 and 1 (like hear_mod = 0.5). Your sound blast could initially set the victim's hear_mod to 0, then gradually restore it over time .