Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.77 KB | None | 0 0
  1. global gTEprops, gLEProps, gTiles, gEEProps, gEffects, lstSpace, gLOprops, gEnvEditorProps, gDirectionKeys
  2.  
  3.  
  4. on exitFrame me
  5.  
  6. repeat with q = 1 to 4 then
  7.  
  8. if (_key.keyPressed([86, 91, 88, 84][q]))and(gDirectionKeys[q] = 0) then
  9.  
  10. gLEProps.camPos = gLEProps.camPos + [point(-1, 0), point(0,-1), point(1,0), point(0,1)][q] * (1 + 9 * _key.keyPressed(83))
  11. repeat with l = 1 to 3 then
  12. lvlEditDraw(rect(1,1,gLOprops.size.loch,gLOprops.size.locv), l)
  13. TEdraw(rect(1,1,gLOprops.size.loch,gLOprops.size.locv), l)
  14. end repeat
  15. drawShortCutsImg(rect(1,1,gLOprops.size.loch,gLOprops.size.locv), 16)
  16.  
  17. me.drawEfMtrx(gEEprops.editEffect)
  18.  
  19. end if
  20. gDirectionKeys[q] = _key.keyPressed([86, 91, 88, 84][q])
  21. end repeat
  22.  
  23. if gEnvEditorProps.waterLevel = -1 then
  24. sprite(11).rect = rect(0,0,0,0)
  25. else
  26. rct = rect(0, gLOprops.size.locv-gEnvEditorProps.waterLevel-gLOProps.extraTiles[4], gLOprops.size.loch, gLOprops.size.locv) - rect(gLEProps.camPos, gLEProps.camPos)
  27. sprite(11).rect = ((rct.intersect(rect(0,0,52,40))+rect(1, 1, 1, 1))*rect(16,16,16,16))+rect(0, -8, 0, 0)
  28. end if
  29.  
  30. msTile = (_mouse.mouseLoc/point(16.0, 16.0))-point(0.4999, 0.4999)
  31. msTile = point(msTile.loch.integer, msTile.locV.integer)
  32. msTile = msTile + gLEProps.camPos
  33.  
  34. actn = 0
  35. actn2 = 0
  36.  
  37. gEEprops.keys.m1 = _mouse.mouseDown
  38. if (gEEprops.keys.m1)and(gEEprops.lastKeys.m1=0) then
  39. actn = 1
  40. end if
  41. gEEprops.lastKeys.m1 = gEEprops.keys.m1
  42. gEEprops.keys.m2 = _mouse.rightmouseDown
  43. if (gEEprops.keys.m2)and(gEEprops.lastKeys.m2=0) then
  44. actn2 = 1
  45. end if
  46. gEEprops.lastKeys.m2 = gEEprops.keys.m2
  47. if msTile <> gEEprops.lstMsPs then
  48. actn = gEEprops.keys.m1
  49. actn2 = gEEprops.keys.m2
  50. end if
  51. gEEprops.lstMsPs = msTile
  52. if actn then
  53. me.useBrush(msTile, 1)
  54. end if
  55. if actn2 then
  56. me.useBrush(msTile, -1)
  57. end if
  58.  
  59. if me.checkKey("N") then
  60. me.initMode("createNew")
  61. end if
  62. if me.checkKey("E") then
  63. me.initMode("chooseEffect")
  64. end if
  65.  
  66. case gEEprops.mode of
  67. "createNew":
  68. if me.checkKey("W") then
  69. me.updateEffectsMenu(point(0, -1))
  70. end if
  71. if me.checkKey("S") then
  72. me.updateEffectsMenu(point(0, 1))
  73. end if
  74. if me.checkKey("A") then
  75. me.updateEffectsMenu(point(-1, 0))
  76. end if
  77. if me.checkKey("D") then
  78. me.updateEffectsMenu(point(1, 0))
  79. end if
  80.  
  81. if _key.keyPressed(" ") then
  82. me.newEffect()
  83. gEEprops.editEffect = gEEprops.effects.count
  84. gEEprops.selectEditEffect = gEEprops.effects.count
  85. me.initMode("editEffect")
  86. end if
  87.  
  88. sprite(21).rect = rect(-100, -100, -100, -100)
  89. "chooseEffect":
  90. if me.checkKey("W") then
  91. me.updateEffectsL(-1)
  92. end if
  93. if me.checkKey("S") then
  94. me.updateEffectsL(1)
  95. end if
  96. if (_key.keyPressed(" "))and(lstSpace=0)then
  97. gEEprops.editEffect = gEEprops.selectEditEffect
  98. me.initMode("editEffect")
  99. me.updateEffectsL(0)
  100. end if
  101.  
  102. sprite(21).rect = rect(-100, -100, -100, -100)
  103. "editEffect":
  104. if me.checkKey("r") then
  105. gEEprops.brushSize = restrict(gEEprops.brushSize + 1, 1, 10)
  106. end if
  107. if me.checkKey("f") then
  108. gEEprops.brushSize = restrict(gEEprops.brushSize - 1, 1, 10)
  109. end if
  110.  
  111. if me.checkKey("W") then
  112. me.updateEditEffect(point(0, -1))
  113. end if
  114. if me.checkKey("S") then
  115. me.updateEditEffect(point(0, 1))
  116. end if
  117. if me.checkKey("A") then
  118. me.updateEditEffect(point(-1, 0))
  119. end if
  120. if me.checkKey("D") then
  121. me.updateEditEffect(point(1, 0))
  122. end if
  123.  
  124. if gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][1] = "seed" then
  125. me.changeOption()
  126. else
  127. if (_key.keyPressed(" "))and(lstSpace=0)then
  128. me.changeOption()
  129. end if
  130. end if
  131.  
  132.  
  133.  
  134.  
  135. sizeAdd = rect(-gEEprops.brushSize+1, -gEEprops.brushSize+1, gEEprops.brushSize-1, gEEprops.brushSize-1) * rect(16,16,16,16)
  136. -- put sizeAdd
  137. sprite(21).rect = (rect(msTile-gLEProps.camPos, msTile-gLEProps.camPos) * rect(16,16,16,16)) + rect(0, 0, 16, 16) + sizeAdd
  138.  
  139. end case
  140.  
  141. sprite(15).rect = (rect(msTile-gLEProps.camPos, msTile-gLEProps.camPos) * rect(16,16,16,16)) + rect(0, 0, 16, 16)
  142.  
  143. --put msTile
  144.  
  145. lstSpace = _key.keyPressed(" ")
  146. --if _key.keyPressed("G")=0 then
  147. script("levelOverview").goToEditor()
  148. go the frame
  149. -- end if
  150. end
  151.  
  152.  
  153.  
  154.  
  155.  
  156. on checkKey me, key
  157. rtrn = 0
  158. gEEprops.keys[symbol(key)] = _key.keyPressed(key)
  159. if (gEEprops.keys[symbol(key)])and(gEEprops.lastKeys[symbol(key)]=0) then
  160. rtrn = 1
  161. end if
  162. gEEprops.lastKeys[symbol(key)] = gEEprops.keys[symbol(key)]
  163. return rtrn
  164. end
  165.  
  166.  
  167.  
  168. on updateEffectsMenu me, mv
  169. gEEprops.emPos = gEEprops.emPos + mv
  170.  
  171. if gEEprops.emPos.locH < 1 then
  172. gEEprops.emPos.locH = gEffects.count
  173. else if gEEprops.emPos.locH > gEffects.count then
  174. gEEprops.emPos.locH = 1
  175. end if
  176.  
  177. if gEEprops.emPos.locV < 1 then
  178. gEEprops.emPos.locV = gEffects[gEEprops.emPos.locH].efs.count
  179. else if gEEprops.emPos.locV > gEffects[gEEprops.emPos.locH].efs.count then
  180. gEEprops.emPos.locV = 1
  181. end if
  182.  
  183. txt = ""
  184. put "[" && gEffects[gEEprops.emPos.locH].nm && "]" after txt
  185. put RETURN after txt
  186.  
  187.  
  188. repeat with tl = 1 to gEffects[gEEprops.emPos.locH].efs.count then
  189. if tl = gEEprops.emPos.locV then
  190. put "-" && gEffects[gEEprops.emPos.locH].efs[tl].nm && "-" && RETURN after txt
  191. else
  192. put gEffects[gEEprops.emPos.locH].efs[tl].nm && RETURN after txt
  193. end if
  194. end repeat
  195.  
  196. member("tileMenu").text = txt
  197.  
  198. end
  199.  
  200.  
  201. on updateEffectsL me, mv
  202. txt = ""
  203. if gEEprops.effects.count <> 0 then
  204. gEEprops.selectEditEffect = gEEprops.selectEditEffect + mv
  205. if gEEprops.selectEditEffect < 1 then
  206. gEEprops.selectEditEffect = gEEprops.effects.count
  207. else if gEEprops.selectEditEffect > gEEprops.effects.count then
  208. gEEprops.selectEditEffect = 1
  209. end if
  210.  
  211.  
  212. put "<EFFECTS>" after txt
  213. put RETURN after txt
  214.  
  215. repeat with ef = 1 to gEEprops.effects.count then
  216.  
  217. if ef = gEEprops.editEffect then
  218. put string(ef)&". *"&gEEprops.effects[ef].nm&"*" after txt
  219. member("editEffectName").text = gEEprops.effects[ef].nm && "("&string(ef)&")"
  220. else if ef = gEEprops.selectEditEffect then
  221. put string(ef)&". -"&gEEprops.effects[ef].nm&"-" after txt
  222. else
  223. put string(ef)&". "&gEEprops.effects[ef].nm after txt
  224. end if
  225. put RETURN after txt
  226. end repeat
  227.  
  228. me.drawEfMtrx(gEEprops.selectEditEffect)
  229. else
  230. member("editEffectName").text = "No effects added"
  231. put "<EFFECTS>" after txt
  232. put RETURN after txt
  233. put "No effects added" after txt
  234. end if
  235. member("effectsL").text = txt
  236. end
  237.  
  238.  
  239. on newEffect me
  240. ef = [#nm:gEffects[gEEprops.emPos.locH].efs[gEEprops.emPos.locV].nm, #tp:"nn", #crossScreen:0, #mtrx:[], #options: [["Delete/Move", ["Delete", "Move Back", "Move Forth"], ""]] ]
  241.  
  242.  
  243. fillWith = 0
  244.  
  245. case ef.nm of
  246. "slime":
  247. ef.tp = "standardErosion"
  248. ef.addProp(#repeats, 130)
  249. ef.addProp(#affectOpenAreas, 0.5)
  250. ef.options.add(["3D", ["Off", "On"], "Off"])
  251. "slimeX3":
  252. ef.tp = "standardErosion"
  253. ef.addProp(#repeats, 130*3)
  254. ef.addProp(#affectOpenAreas, 0.5)
  255. ef.options.add(["3D", ["Off", "On"], "Off"])
  256. "DecalsOnlySlime":
  257. ef.tp = "standardErosion"
  258. ef.addProp(#repeats, 130)
  259. ef.addProp(#affectOpenAreas, 0.5)
  260. "melt":
  261. ef.tp = "standardErosion"
  262. ef.addProp(#repeats, 60)
  263. ef.addProp(#affectOpenAreas, 0.5)
  264.  
  265. "rust":
  266. ef.tp = "standardErosion"
  267. ef.addProp(#repeats, 60)
  268. ef.addProp(#affectOpenAreas, 0.2)
  269. ef.options.add(["3D", ["Off", "On"], "Off"])
  270.  
  271. "barnacles":
  272. ef.tp = "standardErosion"
  273. ef.addProp(#repeats, 60)
  274. ef.addProp(#affectOpenAreas, 0.3)
  275. ef.options.add(["3D", ["Off", "On"], "Off"])
  276.  
  277. "erode":
  278. ef.tp = "standardErosion"
  279. ef.addProp(#repeats, 80)
  280. ef.addProp(#affectOpenAreas, 0.5)
  281.  
  282. "Super Erode":
  283. ef.tp = "standardErosion"
  284. ef.addProp(#repeats, 60)
  285. ef.addProp(#affectOpenAreas, 0.5)
  286.  
  287. "Roughen":
  288. ef.tp = "standardErosion"
  289. ef.addProp(#repeats, 30)
  290. ef.addProp(#affectOpenAreas, 0.05)
  291.  
  292. "Super Melt":
  293. ef.tp = "standardErosion"
  294. ef.addProp(#repeats, 50)
  295. ef.addProp(#affectOpenAreas, 0.5)
  296. ef.options.add(["3D", ["Off", "On"], "Off"])
  297.  
  298. "Destructive Melt":
  299. ef.tp = "standardErosion"
  300. ef.addProp(#repeats, 50)
  301. ef.addProp(#affectOpenAreas, 0.5)
  302. ef.options.add(["3D", ["Off", "On"], "Off"])
  303.  
  304. "Rubble":
  305. ef.options.add(["Layers", ["All", "1", "2", "3", "1:st and 2:nd", "2:nd and 3:rd"], "All"])
  306.  
  307. "Fungi Flowers", "Lighthouse Flowers":
  308. ef.options.add(["Layers", ["1", "2", "3"], "1"])
  309.  
  310. "Fern", "Giant Mushroom", "sprawlBush", "featherFern", "Fungus Tree":
  311. ef.options.add(["Layers", ["1", "2", "3"], "1"])
  312. ef.options.add(["Color", ["Color1", "Color2", "Dead"], "Color2"])
  313.  
  314. "Root Grass", "Growers", "Cacti", "Rain Moss", "Seed Pods", "Grass", "Arm Growers", "Horse Tails", "Circuit Plants", "Feather Plants":
  315. ef.options.add(["Layers", ["All", "1", "2", "3", "1:st and 2:nd", "2:nd and 3:rd"], "All"])
  316. ef.options.add(["Color", ["Color1", "Color2", "Dead"], "Color2"])
  317.  
  318. if(["Arm Growers", "Growers"].getPos( ef.nm ) > 0 )then
  319. ef.crossScreen = 1
  320. end if
  321.  
  322. "Rollers", "Thorn Growers", "Garbage Spirals":
  323. ef.options.add(["Layers", ["All", "1", "2", "3", "1:st and 2:nd", "2:nd and 3:rd"], "All"])
  324. ef.options.add(["Color", ["Color1", "Color2", "Dead"], "Color2"])
  325. ef.crossScreen = 1
  326.  
  327. "wires":
  328. ef.options.add(["Layers", ["All", "1", "2", "3", "1:st and 2:nd", "2:nd and 3:rd"], "All"])
  329. ef.options.add(["Fatness", ["1px", "2px", "3px", "random"], "2px"])
  330. crossScreen = 1
  331.  
  332. "chains":
  333. ef.options.add(["Layers", ["All", "1", "2", "3", "1:st and 2:nd", "2:nd and 3:rd"], "All"])
  334. ef.options.add(["Size", ["Small", "FAT"], "Small"])
  335. ef.crossScreen = 1
  336. "blackGoo":
  337. fillWith = 100
  338. "Hang Roots", "Thick Roots", "Shadow Plants":
  339. ef.options.add(["Layers", ["All", "1", "2", "3", "1:st and 2:nd", "2:nd and 3:rd"], "All"])
  340. ef.crossScreen = 1
  341.  
  342. "Restore As Scaffolding":
  343. ef.options.add(["Layers", ["All", "1", "2", "3", "1:st and 2:nd", "2:nd and 3:rd"], "All"])
  344.  
  345. "Restore As Pipes":
  346. ef.options.add(["Layers", ["All", "1", "2", "3", "1:st and 2:nd", "2:nd and 3:rd"], "All"])
  347.  
  348. "Ceramic Chaos":
  349. ef.options.add(["Colored", ["None", "White"], "White"])
  350.  
  351. "DaddyCorruption":
  352.  
  353. "HeartCorruption":
  354.  
  355. end case
  356.  
  357. repeat with q = 1 to gLOprops.size.loch then
  358. ql = []
  359. repeat with c = 1 to gLOprops.size.locv then
  360. ql.add(fillWith)
  361. end repeat
  362. ef.mtrx.add(ql)
  363. end repeat
  364.  
  365. ef.options.add(["Seed", [], random(500)])
  366.  
  367.  
  368.  
  369. gEEprops.effects.add(ef)
  370.  
  371.  
  372.  
  373. me.updateEffectsL(0)
  374. end
  375.  
  376. "HeartCorruption":
  377.  
  378. end case
  379.  
  380. repeat with q = 1 to gLOprops.size.loch then
  381. ql = []
  382. repeat with c = 1 to gLOprops.size.locv then
  383. ql.add(fillWith)
  384. end repeat
  385. ef.mtrx.add(ql)
  386. end repeat
  387.  
  388. ef.options.add(["Seed", [], random(500)])
  389.  
  390.  
  391.  
  392. gEEprops.effects.add(ef)
  393.  
  394.  
  395.  
  396. me.updateEffectsL(0)
  397. end
  398.  
  399.  
  400.  
  401.  
  402. on useBrush me, pnt, fac
  403. if gEEprops.mode = "editEffect" then
  404. strength = 10 + (90* _key.keyPressed("T"))
  405. if ["BlackGoo", "Fungi Flowers", "Lighthouse Flowers", "Fern", "Giant Mushroom", "Sprawlbush", "featherFern", "Fungus Tree", "Restore As Scaffolding", "Restore As Pipes"].getPos(gEEprops.effects[gEEprops.editEffect].nm)>0 then
  406. strength = 10000
  407. if gEEprops.effects[gEEprops.editEffect].nm <> "BlackGoo" then
  408. gEEprops.brushSize = 1
  409. end if
  410. end if
  411.  
  412. rct = rect(pnt, pnt)+rect(-gEEprops.brushSize, -gEEprops.brushSize, gEEprops.brushSize, gEEprops.brushSize)
  413. repeat with q = rct.left to rct.right then
  414. repeat with c = rct.top to rct.bottom then
  415. if point(q,c).inside(rect(1,1,gLOprops.size.loch+1,gLOprops.size.locv+1))then
  416. val = gEEprops.effects[gEEprops.editEffect].mtrx[q][c]
  417. digFac = 1.0-(diag(point(q,c), pnt).float/gEEprops.brushSize)
  418. if digFac > 0 then
  419.  
  420. val = restrict(val + strength*digFac*fac, 0, 100)
  421. gEEprops.effects[gEEprops.editEffect].mtrx[q][c] = val
  422.  
  423. me.updateEffectGraph(point(q,c), val)
  424.  
  425. end if
  426. end if
  427. end repeat
  428. end repeat
  429. end if
  430. end
  431.  
  432.  
  433. on drawEfMtrx me, l
  434. -- if (gEEprops.effects.count > 0)and(l>0) then
  435. -- repeat with q = rct.left to rct.right then
  436. -- repeat with c = rct.top to rct.bottom then
  437. -- if point(q,c).inside(rect(1,1,gLOprops.size.loch+1,gLOprops.size.locv+1))then
  438. -- val = gEEprops.effects[l].mtrx[q][c]/100.0
  439. -- member("effectsMatrix").image.setPixel(q-1, c-1, color(255-val*255, 255*val, 255-val*255))
  440. -- end if
  441. -- end repeat
  442. -- end repeat
  443. -- else
  444. -- member("effectsMatrix").image.copyPixels(member("pxl").image, member("effectsMatrix").image.rect, member("pxl").image.rect)
  445. -- end if
  446.  
  447.  
  448. if (gEEprops.effects.count > 0)and(l>0) then
  449. repeat with a = gLEProps.camPos.locH to gLEProps.camPos.locH + 52 then
  450. repeat with b = gLEProps.camPos.locV to gLEProps.camPos.locV + 40 then
  451. if(a > 0)and(a<=gLOprops.size.loch)and(b>0)and(b<=gLOprops.size.locV)then
  452. me.updateEffectGraph(point(a,b), gEEprops.effects[l].mtrx[a][b])
  453. else
  454. me.updateEffectGraph(point(a,b), -1)
  455. end if
  456. end repeat
  457. end repeat
  458. else
  459. member("effectsMatrix").image.copyPixels(member("pxl").image, member("effectsMatrix").image.rect, member("pxl").image.rect)
  460. end if
  461. end
  462.  
  463. on updateEffectGraph me, tile, strength
  464. if (strength = -1) then
  465. member("effectsMatrix").image.setPixel(tile.locH-gLEProps.camPos.locH-1, tile.locV-gLEProps.camPos.locV-1, color(0, 0, 0))
  466. else
  467.  
  468. strength = strength / 100.0
  469. member("effectsMatrix").image.setPixel(tile.locH-gLEProps.camPos.locH-1, tile.locV-gLEProps.camPos.locV-1, color(255-strength*255, 255*strength, 255-strength*255))
  470. end if
  471. end
  472.  
  473.  
  474. on initMode me, md
  475. case md of
  476.  
  477. "chooseEffect":
  478. if gEEprops.effects.count > 0 then
  479. gEEprops.selectEditEffect = gEEprops.editEffect
  480. -- me.updateEffectsL(0)
  481. sprite(20).rect = rect((53*16)+8, 10*16, 1024-8, 41*16)
  482. member("EEhelp").text = "Use W, S and the spacebar to select an effect to edit"
  483. else
  484. -- me.updateEffectsL(0)
  485. end if
  486. "editEffect":
  487. -- me.updateEffectsL(0)
  488. sprite(20).rect = rect(8, 42*16, 1024-8, 768-8)
  489. member("EEhelp").text = "Edit effect: Use WASD to change the settings of the effect. Use the left and right mouse buttons to change the effect matrix"
  490. -- me.drawEfMtrx(rect(1,1,52,40), gEEprops.editEffect)
  491. "createNew":
  492. -- me.drawEfMtrx(rect(1,1,52,40), 0)
  493. sprite(20).rect = rect((53*16)+8, 8, 1024-8, 10*16)
  494. member("EEhelp").text = "Create new: Use the WASD keys and the spacebar to select an effect to add"
  495. otherwise:
  496. sprite(20).rect = rect(-1, -1, -1, -1)
  497. member("EEhelp").text = "---"
  498. end case
  499. gEEprops.mode = md
  500. me.updateAllText()
  501. end
  502.  
  503.  
  504.  
  505.  
  506.  
  507. on updateEditEffect me, mv
  508.  
  509. if gEEprops.effects <> [] then
  510. if gEEprops.editEffect > gEEprops.effects.count then
  511. gEEprops.editEffect = gEEprops.effects.count
  512. end if
  513.  
  514. gEEprops.emPos = gEEprops.emPos + mv
  515. if gEEprops.emPos.locV > gEEprops.effects[gEEprops.editEffect].options.count then
  516. gEEprops.emPos.locV = 1
  517. else if gEEprops.emPos.locV < 1 then
  518. gEEprops.emPos.locV = gEEprops.effects[gEEprops.editEffect].options.count
  519. end if
  520. if gEEprops.emPos.locH > gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][2].count then
  521. gEEprops.emPos.locH = 1
  522. else if gEEprops.emPos.locH < 1 then
  523. gEEprops.emPos.locH = gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][2].count
  524. end if
  525.  
  526. txt = ""
  527. put "["&& gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][1] && "]:" && gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][3] after txt
  528. put RETURN after txt
  529. repeat with ef = 1 to gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][2].count then
  530. if ef = gEEprops.emPos.locH then
  531. put "-"&& gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][2][ef] && "- " after txt
  532. else
  533. put gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][2][ef] && " " after txt
  534. end if
  535. end repeat
  536.  
  537. member("effectOptions").text = txt
  538. else
  539. member("effectOptions").text = ""
  540. end if
  541. end
  542.  
  543.  
  544. on changeOption me
  545. -- put gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][1]
  546. -- put gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][gEEprops.emPos.locH]
  547. case gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][1] of
  548. "Delete/Move":
  549. case gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][2][gEEprops.emPos.locH] of
  550. "Delete":
  551. gEEprops.effects.deleteAt(gEEprops.editEffect)
  552. -- me.updateEffectsL(0)
  553. me.initMode("chooseEffect")
  554. gEEprops.editEffect = gEEprops.effects.count
  555. me.updateAllText()
  556. "Move Back":
  557. sv = gEEprops.effects[gEEprops.editEffect].duplicate()
  558. gEEprops.effects.deleteAt(gEEprops.editEffect)
  559. gEEprops.editEffect = restrict(gEEprops.editEffect-1, 1, gEEprops.effects.count)
  560. gEEprops.effects.addAt(gEEprops.editEffect, sv)
  561. gEEprops.selectEditEffect = gEEprops.editEffect
  562. me.updateEffectsL(0)
  563. "Move Forth":
  564. sv = gEEprops.effects[gEEprops.editEffect].duplicate()
  565. gEEprops.effects.deleteAt(gEEprops.editEffect)
  566. gEEprops.editEffect = restrict(gEEprops.editEffect+1, 1, gEEprops.effects.count+1)
  567. gEEprops.effects.addAt(gEEprops.editEffect, sv)
  568. gEEprops.selectEditEffect = gEEprops.editEffect
  569. me.updateEffectsL(0)
  570. end case
  571. "Seed":
  572. if _key.keyPressed("A") then
  573. gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][3] = gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][3] -1
  574. end if
  575. if _key.keyPressed("D") then
  576. gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][3] = gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][3] +1
  577. end if
  578. gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][3] = restrict(gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][3], 1, 500)
  579.  
  580.  
  581. "Color", "Fatness", "Size", "Layers", "3D", "Colored":
  582. gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][3] = gEEprops.effects[gEEprops.editEffect].options[gEEprops.emPos.locV][2][gEEprops.emPos.locH]
  583.  
  584.  
  585.  
  586. end case
  587.  
  588. me.updateEditEffect(point(0,0))
  589. end
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596. on updateAllText me
  597. me.updateEffectsL(0)
  598. me.updateEditEffect(point(0,0))
  599. me.updateEffectsMenu(point(0,0))
  600.  
  601. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement