【火药】algodoo中的又一大发明
algodoo吧
全部回复
仅看楼主
level 9
Alone℃M 楼主
一楼喂度娘
2020年04月08日 04点04分 1
level 9
Alone℃M 楼主
二楼放图
(未点燃)
(已点燃)
2020年04月08日 04点04分 2
此物件用到了脚本,请注意[滑稽]
2020年04月08日 05点04分
level 9
Alone℃M 楼主
特性:只要这个“火药”碰到有叫“fire(火)”的东西,他就会燃烧,然后爆发。
2020年04月08日 04点04分 3
并且,缩放会改变“火药”燃烧的剧烈程度
2020年04月08日 05点04分
level 9
Alone℃M 楼主
注意:
1.别放太多,电脑会炸
2.存成元件使用起来更方便
2020年04月08日 05点04分 5
level 13
algobox上面有挺多各式各样的这种炸弹,可以下下来把玩把玩。[捂嘴笑]
2020年04月08日 11点04分 7
[滑稽][滑稽]
2020年04月09日 04点04分
level 9
Alone℃M 楼主
这里放出脚本,供想要编程的人参考学习。
onCollide=(e)=>{
e.other.materialName == "fire" ? {
for(math.toInt(radius ^ 2 * math.pi * 250), (r)=>{
Scene.addCircle({
color := [1.0, 0.0, 0.0, 0.5];
drawCake := false;
radius := 0.13;
pos := e.pos;
density := 1;
vel := [rand.normal, rand.normal];
drawborder := false;
timetolive := 0.5;
materialName := "fire";
postStep := (e)=>{
color = {
[timetolive, 0.0, 0.0, 0.5 * timetolive]
}
}
})
});
scene.removeEntity(Scene.entityByID(entityID))
} : {}
}
脚本80是我自己写的,20%是借鉴的,有不明白的地方可以留个言[勉强]
2020年04月08日 14点04分 8
level 9
Alone℃M 楼主
链接:/s/19xnz57fgmyaMnuRrNwcCIg
提取码:p9pc
2020年04月09日 01点04分 9
1