-
Notifications
You must be signed in to change notification settings - Fork 94
del_hp_down_trigger
Ryzom Core Wiki edited this page Jul 8, 2024
·
3 revisions
title: Delete HP Down Trigger description: published: true date: 2023-03-16T23:06:00.915Z tags: editor: markdown dateCreated: 2023-03-16T22:22:17.545Z
The delHpDownTrigger native AI script function is used to unregister a previously registered HP decrease trigger. The same threshold and trigger handler used when registering the trigger must be passed to this function. If several triggers were defined with the same parameters, only one will be removed.
()delHpDownTrigger(threshold: f, user_event_n: f) // delHpDownTrigger_ff_
()delHpDownTrigger(threshold: f, callback: s) // delHpDownTrigger_fs_
- threshold (float): The HP threshold of the trigger that was registered.
- user_event_n (float): The user event number used when registering the trigger.
- callback (string): The name of the script function used when registering the trigger.
()delHpDownTrigger(0.5, 5);
This example code unregisters a trigger that was registered to trigger user event 5 when the HP level of a bot crossed 0.5.
()delHpDownTrigger(0.5, "onHPDecrease");
This example code unregisters a trigger that was registered to call the "onHPDecrease" script function when the HP level of a bot crossed 0.5.