Possible particle emitter bug or just bizarre implementation of a command.
The
phy set emitter range command doesn't operate as expected. In the documentation is says you pass it minimum and maximum axis positions for the emitter to function on. However, it appears as though what you're actually passing it is minimum positions and then a range to emit across. This had me scratching my head for ages, so a change in the documentation or implementation of the command as it describes in the documentation is essential. Here you go:
set display mode 1024,768,32,0
sync on: sync rate 0
autocam off
position camera 1500,1000,0
xrotate camera 30
yrotate camera 270
make object plain 1,2000,2000
xrotate object 1,270
color object 1,rgb(255,0,0)
phy start
MakeEmitter(0,0,0,2)
MakeEmitter(-500,0,500,3)
MakeEmitter(-500,0,-500,4)
MakeEmitter(500,0,-500,5)
do
phy update
sync
loop
function MakeEmitter(x#,y#,z#,obj)
phy make particle emitter obj,50,1,x#,y#,z#,1,0,1,0
phy set emitter collision scale obj,0.25
phy set emitter end color obj,0,0,0
phy set emitter fade obj,1
`phy set emitter gravity obj,0
phy set emitter life span obj,0.005
phy set emitter linear velocity range obj,-3,20,-3,3,30,3
phy set emitter size obj,5
phy set emitter max size obj,40
phy set emitter growth rate obj,1
phy set emitter update obj,0.2
`As described in the documentation - minimum and maximum axis positions. Should be
`a small area of 4 units, but extends for a long distance with positive values
phy set emitter range obj,x#-2,y#,z#-2,x#+2,y#+4,z#+2
`Seems to function correctly this way. Instead of using axis positions as it says in
`the documentation, you pass it minimum axis positions and then a maximum offset range
`phy set emitter range obj,x#-2,y#,z#-2,4,4,4
endfunction
Swap the phy set emitter range commands in the function around. The one set initially is implemented as per the manual. The second implementation seems to be the correct one, but is not how it is described in the manual.
MIKE EDIT - reference page corrected