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
- AnimatedMapObject
- AnimatedObject
- Bale
- Basketball
- BgaSellStation
- BunkerSilo
- BuyingStation
- DigitalDisplay
- DogBall
- HelpIcons
- InlineBale
- InlineBaleSingle
- LoadingStation
- MountableObject
- NightIllumination
- Nightlight2
- NightlightFlicker
- PackedBale
- PhysicsObject
- ProductionPoint
- Rotator
- SellingStation
- SimParticleSystem
- Storage
- SunAdmirer
- TourIconsMobile
- UnloadingStation
- VehicleSellingPoint
- WildlifeSpawner
- 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
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
SimParticleSystem
DescriptionThis pre-simulates a particle system so it doesn't start at zero when the game beginsFunctions
new
DescriptionCreating SimParticleSystemDefinition
new(integer name)Arguments
integer | name | node id |
table | instance | Instance of object |
21 | function SimParticleSystem.new(name) |
22 | local self = {} |
23 | setmetatable(self, SimParticleSystem_mt) |
24 | self.id = name |
25 | |
26 | local particleSystem = nil |
27 | |
28 | if getHasClassId(self.id, ClassIds.SHAPE) then |
29 | local geometry = getGeometry(self.id) |
30 | if geometry ~= 0 then |
31 | if getHasClassId(geometry, ClassIds.PRECIPITATION) then |
32 | particleSystem = geometry |
33 | end |
34 | end |
35 | end |
36 | |
37 | if particleSystem ~= nil then |
38 | local lifespan = getParticleSystemLifespan(particleSystem) |
39 | addParticleSystemSimulationTime(particleSystem, lifespan) |
40 | end |
41 | |
42 | return self |
43 | end |
onCreate
DescriptionCreating SimParticleSystemDefinition
onCreate(integer id)Arguments
integer | id | node id |
13 | function SimParticleSystem:onCreate(id) |
14 | g_currentMission:addNonUpdateable(SimParticleSystem.new(id)) |
15 | end |