Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- GUI
- Handtools
- Hud
- I3d
- Input
- Jobs
- Maps
- Materials
- Misc
- Objects
- Parameters
- Placeables
- Placement
- Player
- Shop
- Sounds
- Specialization
- Specializations
- StateMachine
- Statistics
- Tasks
- Triggers
- Utils
- Vehicles
Engine v1_7_1_0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- general
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- NoteNode
- Overlays
- Particle System
- Physics
- Rendering
- getMaterialCustomShaderFilename
- getMaterialCustomShaderVariation
- getMaterialDiffuseMapFilename
- getMaterialDiffuseMapHasAlpha
- getMaterialEmissiveMapFilename
- getMaterialEmissiveMapHasAlpha
- getMaterialGlossMapFilename
- getMaterialHasRefractionMap
- getMaterialIsAlphaBlended
- getMaterialIsAlphaTested
- getMaterialNormalMapFilename
- getMaterialNormalMapFormat
- getMaterialReflectionMapScaling
- setMaterialCustomMapFromFile
- setMaterialCustomShaderVariation
- setMaterialDiffuseMapFromFile
- setMaterialGlossMapFromFile
- setMaterialNormalMapFromFile
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
PlayerThrowObjectEvent
ParentEventFunctions
emptyNew
DescriptionCreate an empty instanceDefinition
emptyNew()Return Values
table | instance | Instance of object |
11 | function PlayerThrowObjectEvent.emptyNew() |
12 | local self = Event.new(PlayerThrowObjectEvent_mt) |
13 | return self |
14 | end |
new
DescriptionCreate an instanceDefinition
new(table player)Arguments
table | player | player instance |
table | instance | Instance of object |
20 | function PlayerThrowObjectEvent.new(player) |
21 | local self = PlayerThrowObjectEvent.emptyNew() |
22 | self.player = player |
23 | return self |
24 | end |
readStream
DescriptionReads network streamDefinition
readStream(integer streamId, table connection)Arguments
integer | streamId | network stream identification |
table | connection | connection information |
30 | function PlayerThrowObjectEvent:readStream(streamId, connection) |
31 | self.player = NetworkUtil.readNodeObject(streamId) |
32 | self:run(connection) |
33 | end |
run
DescriptionRun eventDefinition
run(table connection)Arguments
table | connection | connection information |
46 | function PlayerThrowObjectEvent:run(connection) |
47 | if not connection:getIsServer() then |
48 | g_server:broadcastEvent(self, false, connection, self.player) |
49 | end |
50 | |
51 | self.player:throwObject(true) |
52 | end |
sendEvent
DescriptionDefinitionsendEvent()Code
56 | function PlayerThrowObjectEvent.sendEvent(player, noEventSend) |
57 | if noEventSend == nil or noEventSend == false then |
58 | if g_server ~= nil then |
59 | g_server:broadcastEvent(PlayerThrowObjectEvent.new(player), nil, nil, player) |
60 | else |
61 | g_client:getServerConnection():sendEvent(PlayerThrowObjectEvent.new(player)) |
62 | end |
63 | end |
64 | end |
writeStream
DescriptionWrites network streamDefinition
writeStream(integer streamId, table connection)Arguments
integer | streamId | network stream identification |
table | connection | connection information |
39 | function PlayerThrowObjectEvent:writeStream(streamId, connection) |
40 | NetworkUtil.writeNodeObject(streamId, self.player) |
41 | end |