by sniperz227 » Thu Jan 19, 2012 3:11 am
if(self.health < 20)
{
sound (self,CHAN_VOICE,"soundname here", 1, ATTN_NORM);
}
i wasnt sure if you were talking bout if there health goes under 20 or while its under 20 the method above is if for while you'd obviously do while loop.
for idiling you'd use
if (!self.velocity_x && !self.velocity_y)
{
sound (self,CHAN_VOICE,"soundname here", 1, ATTN_NORM);
}
etc.. for walking basically the opposite of the example above. although i should worn you the statement above is called as soon as your player stops moving so if you want it to be after a certain amount of time just use the time thing in qc