Skip to content

Commit 303fd21

Browse files
add onElementInteriorChange def
1 parent 7d3d0de commit 303fd21

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
local vehicle = createVehicle(411, 0, 0, 3)
2+
setTimer(setElementInterior, 1000, 1, vehicle, 10)
3+
4+
addEventHandler("onElementInteriorChange", vehicle, function(oldInterior, newInterior)
5+
outputChatBox(inspect(source).."'s interior changed from "..oldInterior.." to "..newInterior)
6+
end)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: onElementInteriorChange
2+
type: server
3+
description: >
4+
This event is triggered when the interior of an element is changed using setElementInterior.
5+
parameters:
6+
- name: oldInterior
7+
type: int
8+
description: An int representing the interior the element was in before.
9+
- name: newInterior
10+
type: int
11+
description: An int representing the interior the element is in now.
12+
source_element:
13+
type: element
14+
description: The source of this event is the element that changed its interior.
15+
examples:
16+
- path: examples/onElementInteriorChange.lua
17+
description: >
18+
Demonstrates how to detect and respond to an element's interior change.
19+
Includes vehicle creation and an event handler that reports the interior transition.
20+
notes: []
21+
preview_images: []
22+
version: {}
23+
issues: []
24+
see_also: []

web/astro.config.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,7 @@ export default defineConfig({
7575
{
7676
label: 'Elements',
7777
items: [
78-
{label: 'Element types', link: 'Element', badge:{
79-
text: 'New',
80-
variant: 'tip',
81-
}},
78+
{label: 'Element types', link: 'Element'},
8279
{label: 'Element tree', link: 'Element_tree'},
8380
]
8481
},

0 commit comments

Comments
 (0)