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
FillUnitUnloadEvent
DescriptionEvent for turned on stateParent
EventFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
13 | function FillUnitUnloadEvent.emptyNew() |
14 | local self = Event.new(FillUnitUnloadEvent_mt) |
15 | return self |
16 | end |
new
DescriptionCreate new instance of eventDefinition
new(table object)Arguments
table | object | object |
21 | function FillUnitUnloadEvent.new(object) |
22 | local self = FillUnitUnloadEvent.emptyNew() |
23 | self.object = object |
24 | return self |
25 | end |
newServerToClient
DescriptionDefinitionnewServerToClient()Code
29 | function FillUnitUnloadEvent.newServerToClient() |
30 | local self = FillUnitUnloadEvent.emptyNew() |
31 | return self |
32 | end |
readStream
DescriptionCalled on client side on joinDefinition
readStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
38 | function FillUnitUnloadEvent:readStream(streamId, connection) |
39 | if not connection:getIsServer() then |
40 | self.object = NetworkUtil.readNodeObject(streamId) |
41 | end |
42 | self:run(connection) |
43 | end |
run
DescriptionRun action on receiving sideDefinition
run(integer connection)Arguments
integer | connection | connection |
58 | function FillUnitUnloadEvent:run(connection) |
59 | if not connection:getIsServer() then |
60 | if self.object ~= nil and self.object:getIsSynchronized() then |
61 | local success = self.object:unloadFillUnits(true) |
62 | if not success then |
63 | connection:sendEvent(FillUnitUnloadEvent.newServerToClient()) |
64 | end |
65 | end |
66 | else |
67 | g_currentMission:addIngameNotification(FSBaseMission.INGAME_NOTIFICATION_INFO, g_i18n:getText("fillUnit_unload_nospace")) |
68 | end |
69 | end |
writeStream
DescriptionCalled on server side on joinDefinition
writeStream(integer streamId, integer connection)Arguments
integer | streamId | streamId |
integer | connection | connection |
49 | function FillUnitUnloadEvent:writeStream(streamId, connection) |
50 | if connection:getIsServer() then |
51 | NetworkUtil.writeNodeObject(streamId, self.object) |
52 | end |
53 | end |