del_hp_up_trigger - ryzom/ryzomcore GitHub Wiki
title: Delete HP Up Trigger description: published: true date: 2023-03-16T23:06:04.282Z tags: editor: markdown dateCreated: 2023-03-16T22:22:21.385Z
The delHpUpTrigger native AI script function unregisters a trigger on HP increases. The same values used when registering the trigger must be passed. If several triggers were defined with the same parameters, only one is removed.
()delHpUpTrigger(threshold: f, user_event_n: f) // delHpUpTrigger_ff_
()delHpUpTrigger(threshold: f, callback: s) // delHpUpTrigger_fs_
- threshold (float): The HP threshold of the trigger to be removed.
- user_event_n (float): The user event number of the trigger to be removed.
- callback (string): The name of the script function of the trigger to be removed.
()delHpUpTrigger(0.5, 4);
This example code removes the trigger that will trigger user event 4 when the HP level of a bot crosses 0.5.
()delHpUpTrigger(0.5, "onHPIncrease");
This example code removes the trigger that will call the "onHPIncrease" script function when the HP level of a bot crosses 0.5.