-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlizzPart2.ms
More file actions
257 lines (242 loc) · 11.6 KB
/
BlizzPart2.ms
File metadata and controls
257 lines (242 loc) · 11.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
plugin simpleManipulator BlizzParticle2
name:"BlizzPart2"
classID:#(0x2942cac, 0x43c6a3d9)
category:"Warcraft 3 Systems"
(
local ParticleArray = #()
--local redColor = colorMan.getColor #manipulatorsSelected
local whiteColor = color 255 255 255
local spColor = color 64 92 0
local pcolor = color 128 0 164
local partnum = 0
parameters main rollout:params
(
--emition options
--(
speed type:#float ui:speed default: 10.0
variation type:#float ui:width default:2.0
coneangle type:#float ui:coneangle default:0
gravity type:#float ui:gravity default:0.0
--)
--timing options
--(
Life type:#float ui:Life default: 1.0 animatable:false
PartsEmit type:#float ui:PartEmit default: 50.0
Squirt type:#boolean ui:Squirt default:false animatable:false
--)
--size options
--(
width type:#float ui:width --default: 10.0
length type:#float ui:length --default: 10.0
LineEmitter type:#boolean ui:LineEmitter default:false animatable:false
--)
--texture options
--(
rtexture type:#integer ui:rtexture default:1 animatable:false
texture type:#string ui:texture animatable:false
path type:#string ui:path animatable:false
filtermode type:#integer ui:filtermode default:2 animatable:false
rows type:#integer ui:rows default:1 animatable:false
cols type:#integer ui:cols default:1 animatable:false
Unshaded type:#boolean ui:unshaded default:false animatable:false
Unfogged type:#boolean ui:unfogged default:false animatable:false
SortZ type:#boolean ui:sortz default:false animatable:false
--)
--particle options
--(
particletype type:#integer ui:PartType default:1 animatable:false
taillength type:#float ui:TailLength default:1.0 animatable:false
midtime type:#float ui:MiddleTime default:0.5 animatable:false
--color
startcolor type:#color ui:Scolor default:[255,255,255] animatable:false
middlecolor type:#color ui:Mcolor default:[255,255,255] animatable:false
endcolor type:#color ui:Ecolor default:[255,255,255] animatable:false
--alpha
startalpha type:#float ui:Salpha default:255 animatable:false
middlealpha type:#float ui:Malpha default:255 animatable:false
endalpha type:#float ui:Ealpha default:0 animatable:false
--scale
startscale type:#float ui:Sscale default:10.0 animatable:false
middlescale type:#float ui:Mscale default:10.0 animatable:false
endscale type:#float ui:Escale default:10.0 animatable:false
--lifespanHead
startLifespanHead type:#integer ui:Slheaduw default:0 animatable:false
endLifespanHead type:#integer ui:Elheaduw default:0 animatable:false
repeatLifespanHead type:#integer ui:Rlheaduw default:1 animatable:false
--decayHead
startDecayHead type:#integer ui:Sdheaduw default:0 animatable:false
endDecayHead type:#integer ui:Edheaduw default:0 animatable:false
repeatDecayHead type:#integer ui:Rdheaduw default:1 animatable:false
--lifespanTail
startLifespanTail type:#integer ui:Sltailuw default:0 animatable:false
endLifespanTail type:#integer ui:Eltailuw default:0 animatable:false
repeatLifespanTail type:#integer ui:Rltailuw default:1 animatable:false
--decayTail
startDecayTail type:#integer ui:Sdtailuw default:0 animatable:false
endDecayTail type:#integer ui:Edtailuw default:0 animatable:false
repeatDecayTail type:#integer ui:Rdtailuw default:1 animatable:false
--)
--other options
--(
priorityplane type:#integer ui:Priority default:0 animatable:false
ParticleSpace type:#boolean ui:PartSpace default:false animatable:false
XYQuads type:#boolean ui:XYQuads default:false animatable:false
--)
textureid type:#integer default:0 animatable:false
)
tool create
(
on mousePoint click do
(
case click of
(
1: nodeTM.translation = gridPoint
2: #stop
3: #stop
)
)
on mouseMove click do
(
case click of
(
2: (length = abs (gridDist.y); width = abs (gridDist.x))
)
)
)
function MakeSquare a b =
(
local p1
p1 = [a, b, 0]
p2 = copy p1
p2.x = p2.x*(-1)
p3 = copy p1
p3 = (-1)*p3
p4 = copy p1
p4.y = p4.y*(-1)
giz = manip.makeGizmoShape()
giz.startNewLine()
giz.addpoint p1
giz.addpoint p2
giz.addpoint p3
giz.addpoint p4
giz.addpoint p1
return giz
)
on updateGizmos do
(
this.clearGizmos()
p1 = [width, 0, 0]
p2 = [0, length, 0]
p3 = (cross p1 p2)
p3 = normalize p3
l = distance (p1+p2) [0,0,0]
p3 = p3*l
giz = manip.makeGizmoShape()
giz.startNewLine()
giz.addpoint [0,0,0]
giz.addpoint p3
this.addGizmoShape (MakeSquare this.Width this.Length) 0 spColor whiteColor
--this.addGizmoShape (MakeSquare (width/5) (length/5)) 0 spColor whiteColor
this.addGizmoShape giz 0 spColor whiteColor
)
rollout params "Warcraft Parameters" width:163 height:1265
(
spinner speed "Speed: " pos:[48,21] width:94 height:16 range:[0,999999,0] fieldwidth:45
spinner variation "Variation %: " pos:[27,42] width:115 height:16 range:[0,99999,0] scale:0.05 fieldwidth:45 --offset:[0,-15]
spinner coneangle "Cone Angle: " pos:[24,63] width:118 height:16 range:[0,180,0] fieldwidth:45
GroupBox EmitterOptions "Emitter Options" pos:[2,4] width:154 height:102
spinner life "Life(sec): " pos:[36,137] width:103 height:16 range:[0,999999,0] fieldwidth:45
spinner PartEmit "Parts/Sec: " pos:[27,159] width:111 height:16 range:[0,99999,50] scale:0.5 fieldwidth:45
checkbox squirt "Squirt!" pos:[86,179] width:54 height:15 fieldwidth:45
GroupBox TimingOptions "Timing Options" pos:[2,114] width:154 height:84
spinner width "Width: " pos:[50,219] width:91 height:16 range:[0,100000,0] fieldwidth:45
spinner length "Length: " pos:[46,239] width:96 height:16 range:[0,100000,0] fieldwidth:45
checkbox lineEmitter "Line Emitter" pos:[66,260] width:79 height:15 fieldwidth:45
GroupBox SizeOptions "Size Options" pos:[2,200] width:154 height:81
GroupBox grp4 "Texture Options" pos:[4,288] width:154 height:284
spinner gravity "Gravity: " pos:[45,84] width:94 height:16 range:[-1e+006,1e+006,0] type:#float scale:0.1
radiobuttons filtermode "" pos:[12,308] width:142 height:48 labels:#("Blend", "Add", "Modulate", "Mod 2X", "Alpha Key") default:2 columns:2
edittext texture "" pos:[6,380] width:126 height:16 enabled:true
button btn1 "..." pos:[133,378] width:20 height:18
label lbl1 "Texture Filename:" pos:[10,361] width:119 height:17
spinner rows "Rows" pos:[17,451] width:58 height:16 range:[1,100,1] type:#integer scale:1
spinner cols "Cols" pos:[91,451] width:52 height:16 range:[1,100,1] type:#integer scale:1
checkbox unshaded "Unshaded" pos:[10,475] width:72 height:22
checkbox SortZ "Sort Z" pos:[83,474] width:68 height:22
checkbox unfogged "Unfogged" pos:[10,497] width:72 height:22
dropdownList rtexture "Replaceable Texture" pos:[10,521] width:132 height:40 items:#("Not Replaceable", "Team Color", "Team Glow") selection:3
GroupBox grp5 "Particle Options" pos:[4,583] width:156 height:565
radiobuttons PartType "" pos:[5,603] width:157 height:16 labels:#("Head", "Tail", "Both") columns:3
spinner tailLength "Tail Length: " pos:[26,624] width:100 height:16 range:[0,100,1] scale:0.05
label lbl4 "Time(Parametric):" pos:[27,646] width:89 height:18
label lbl6 "Start:" pos:[12,666] width:33 height:16
label lbl7 "Middle:" pos:[56,666] width:33 height:16
label lbl8 "End:" pos:[104,666] width:33 height:16
label lbl9 "0" pos:[18,682] width:14 height:14
label lbl10 "1" pos:[108,682] width:14 height:14
spinner MiddleTime "" pos:[53,681] width:40 height:16 enabled:true range:[0.01,0.99,0.5] scale:0.01
label lbl11 "Color:" pos:[52,707] width:33 height:17
label lbl15 "Start" pos:[14,727] width:38 height:14
label lbl16 "Middle" pos:[56,727] width:38 height:14
label lbl17 "End" pos:[112,727] width:38 height:14
colorPicker Scolor "" pos:[5,743] width:36 height:29 color:(color 255 255 255) title:""
colorPicker Mcolor "" pos:[55,743] width:36 height:29 color:(color 255 255 255) title:""
colorPicker Ecolor "" pos:[106,743] width:36 height:29 color:(color 255 255 255) title:""
label lbl18 "Alpha:" pos:[51,781] width:39 height:18
spinner Salpha "" pos:[7,820] width:38 height:16 range:[0,255,255] type:#integer scale:1
label lbl19 "Start" pos:[10,803] width:38 height:14
label lbl20 "Middle" pos:[53,802] width:38 height:14
label lbl21 "End" pos:[106,802] width:38 height:14
spinner Malpha "" pos:[50,819] width:38 height:16 range:[0,255,255] type:#integer scale:1
spinner Ealpha "" pos:[99,819] width:38 height:16 range:[0,255,0] type:#integer scale:1
label lbl31 "Scale:" pos:[48,840] width:39 height:18
label lbl32 "Start" pos:[8,862] width:38 height:14
label lbl33 "Middle" pos:[51,861] width:38 height:14
label lbl34 "End" pos:[104,861] width:38 height:14
label lbl35 "Lifespan Head UV Anim:" pos:[11,900] width:122 height:18
spinner Slheaduw "" pos:[7,939] width:38 height:16 range:[0,1028,0] type:#integer scale:1
label lbl36 "Start" pos:[7,922] width:38 height:14
label lbl37 "Middle" pos:[50,921] width:38 height:14
label lbl38 "End" pos:[103,921] width:38 height:14
spinner Elheaduw "" pos:[50,938] width:38 height:16 range:[0,1028,0] type:#integer scale:1
spinner Rlheaduw "" pos:[99,938] width:38 height:16 enabled:true range:[0,255,1] type:#integer scale:1
spinner Sscale "" pos:[7,879] width:40 height:16 enabled:true range:[0,1e+012,10] scale:0.1
spinner Mscale "" pos:[53,879] width:40 height:16 enabled:true range:[0,1e+012,10] scale:0.1
spinner Escale "" pos:[101,879] width:40 height:16 enabled:true range:[0,1e+012,10] scale:0.1
label lbl39 "Decay Head UV Anim:" pos:[11,961] width:122 height:18
spinner Sdheaduw "" pos:[7,1000] width:38 height:16 range:[0,1028,0] type:#integer scale:1
label lbl40 "Start" pos:[7,983] width:38 height:14
label lbl41 "Middle" pos:[50,982] width:38 height:14
label lbl42 "End" pos:[103,982] width:38 height:14
spinner Edheaduw "" pos:[50,999] width:38 height:16 range:[0,1028,0] type:#integer scale:1
spinner Rdheaduw "" pos:[99,999] width:38 height:16 enabled:true range:[0,255,1] type:#integer scale:1
label lbl43 "Lifespan Tail UV Anim:" pos:[11,1022] width:122 height:18
spinner Sltailuw "" pos:[7,1061] width:38 height:16 range:[0,1028,0] type:#integer scale:1
label lbl44 "Start" pos:[7,1044] width:38 height:14
label lbl45 "Middle" pos:[50,1043] width:38 height:14
label lbl46 "End" pos:[103,1043] width:38 height:14
spinner Eltailuw "" pos:[50,1060] width:38 height:16 range:[0,1028,0] type:#integer scale:1
spinner Rltailuw "" pos:[99,1060] width:38 height:16 enabled:true range:[0,255,1] type:#integer scale:1
label lbl47 "Decay Tail UV Anim:" pos:[11,1082] width:122 height:18
spinner Sdtailuw "" pos:[7,1121] width:38 height:16 range:[0,1028,0] type:#integer scale:1
label lbl48 "Start" pos:[7,1104] width:38 height:14
label lbl49 "Middle" pos:[50,1103] width:38 height:14
label lbl50 "End" pos:[103,1103] width:38 height:14
spinner Edtailuw "" pos:[50,1120] width:38 height:16 range:[0,1028,0] type:#integer scale:1
spinner Rdtailuw "" pos:[99,1120] width:38 height:16 enabled:true range:[0,255,1] type:#integer scale:1
GroupBox grp21 "Other Options" pos:[4,1157] width:156 height:97
spinner Priority "Priority Plane: " pos:[23,1175] width:124 height:16 type:#integer scale:1
checkbox PartSpace "Particles in Model Space" pos:[14,1196] width:135 height:22
checkbox XYQuads "XY Quads" pos:[13,1220] width:136 height:20
edittext path "" pos:[7,417] width:144 height:19
label lbl71 "Path:" pos:[12,401] width:102 height:14
on btn1 pressed do
(
texture.enabled = false
f = getOpenFileName types:"TGA File (*.tga)|*.tga|All Files (*.*)|*.*|"
if f != undefined then
texture.text = f
texture.enabled = true
)
)
)