Well, perhaps you need to be more detailed about what you are exactly trying to achieve.
The answer you got for the way you asked the question is just spot on.
If that is not exactly what you are aiming for, try detail more the mechanic you are trying to achieve.
Analysing/breaking it down will help you in the long run and will help us help you with how to do it.