|
holypickle Newbie
Joined: 20 Mar 2016 Posts: 1
|
Posted: Sun Mar 20, 2016 3:17 am
Simple Trigger function |
When my health is below 50% I want my client to beep.
How would I do this using zscripting? I have the #BEEP part down! |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Mar 20, 2016 6:14 am |
We would need some examples of your prompt in order to write the #TRIGGER that would capture the health information. If the prompt doesn't also contain max health then we would need to know how to get that information as well. The 50% calculation can be done with %eval. I would also suggest a sub-state to provide a delay between the beeps.
If we write it on the forum it will likely be in a command form that you can copy and paste into the command line to create all the settings. Normally you would make those settings by opening the package editor and selecting New Whatever and then would put all the scripts in there. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sun Mar 20, 2016 8:13 am |
#IF (@health<(@healthMax/2)) {#BEEP}
Insert that into your trigger after defining @health and @healthMax |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|