Events.NewAlarmWithRelativeOffset
---------------------------------

Creates a new alarm with a relative trigger time.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Events](component_Events.md) | [6.2](newinversion62.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "Events.NewAlarmWithRelativeOffset"; Offset ) 

**MBS**( **"Events.NewAlarmWithRelativeOffset";** /\* Creates a new alarm with a relative trigger time. \*/  
**$Offset**) /\* The offset from the event start that the alarm should fire.  
in Seconds.e.g. 3\*60 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Offset | The offset from the event start that the alarm should fire.   in Seconds. | 3\*60 |

### Result

Returns reference number or error.

### Description

Creates a new alarm with a relative trigger time.  
### Examples

New alarm in 3 minutes:

 MBS ( "Events.NewAlarmWithRelativeOffset"; 3 \* 60 )  
Add display alarm:

 Set Variable \[$alarm1 ; Value:MBS ( "Events.NewAlarmWithRelativeOffset"; 0 )\]  
Set Variable \[$r ; Value:MBS ("[Events.Item.AddAlarm](EventsItemAddAlarm.md)"; $c ; $alarm1 )\]  
Add alarm with sound 15 minutes before event:

 Set Variable \[$alarm2 ; Value:MBS ( "Events.NewAlarmWithRelativeOffset"; -15\*60 )\]  
Set Variable \[$r ; Value:MBS ( "[Events.Alarm.SetSound](EventsAlarmSetSound.md)"; $alarm2 ; "Submarine" )\]  
Set Variable \[$r ; Value:MBS ("[Events.Item.AddAlarm](EventsItemAddAlarm.md)"; $c ; $alarm2 )\]  
### See also

- [Events.Alarm.GetRelativeOffset](EventsAlarmGetRelativeOffset.md)
- [Events.Alarm.SetRelativeOffset](EventsAlarmSetRelativeOffset.md)
- [Events.Alarm.SetSound](EventsAlarmSetSound.md)
- [Events.Item.AddAlarm](EventsItemAddAlarm.md)
- [Events.NewAlarm](EventsNewAlarm.md)

This function checks for a license.

Created 10th March 2016 , last changed 24th March 2016

  
[Events.NewAlarmWithAbsoluteDate](EventsNewAlarmWithAbsoluteDate.md) - [Events.NewCalendar](EventsNewCalendar.md)

[HTML Version](EventsNewAlarmWithRelativeOffset.shtml)