3D Canvas Community
3D Canvas Discussion Forums
Plug-In Development and Scripting
Explosion Script For Planetoides|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Junior Member |
Hi
the foloowing script isn't tested but if it's ok it would make an enhanced part of an planetoidal explosion here is how to make this particular scene ad an object and rename it explo or something like that. then ad some asteroides you can find on media downloads of 3d canvas around the object very close to each other (but not on the same position as the group named explo). set all asteroides group childs of explo and delete the object that was in explo the run the folowing script named "Planet Explosion" quote: I hope it will orkand that you will enjoy it i'm not so good in scripting Bye Draicker2003 |
||
|
|
Member |
so how do i get this script and put it into 3dc? i have not yet tried using a script posted like this.
thanks, -korben |
|||
|
|
Member |
You select "New script" and then save it.
EDIT: This script doesn't work, it won't even save. Just gives an error. "Eat me! See if I care." |
|||
|
Member![]() |
Hello Draicker2003,
I copied & pasted the script into the "Create Scripts" - but it wont validate. Any ideas to why? [me or it] KB |
|||
|
|
Junior Member |
hi KB
there are some errors on so as i said i had not test it since i tested. when i have tested it didn't do as i espected i'm not so good in scripting. can some one helping me out with this please here the code back
Language=Vbscript
'Purpose explosion mouvement
'Can be used to create an explosion of a planet
Dim Scene, GrCount, GroupEx, GrN, PosX, PosY, PosZ, GrEx
Dim CanvApp, FPS, FrEnd, FrBeg, Speed
Sub Main(CanvasApp)
Dim Msg, Title, Style, Resp
Msg = "Do you want to create an explosion?"
Title = "!!! Expolsion Imenent !!!"
Style = vbYesNo
Resp = MsgBox(Msg, Style, Title)
If Resp = vbYes then
Set CanvApp = CanvasApp
Set Scene = CanvasApp.GetActiveScene
GrN = Inputbox("Give name ogf group where child must explode:")
FPS = Inputbox("How many Frames do you want per seconds:","Animation Frame/seconds",30)
Scene.SetAnimationKeyFPS(FPS)
FrBeg = Inputbox("when must this animation begin:","Begin animation sequence",0)
FrEnd = Inputbox("when must this animation end:","end of animation sequence,90)
Speed = Inputbox("set the animation speed,1 is standard speed:","Speed velocity",1)
GrCount = Scene.GetGroupCount()
Dim C1, Gt, Gn
For C1 = 0 To GrCount-1
Set Gt = Scene.Getgroup(C1)
Gn = Gt.GetName()
If Gn = Grn Then
Set GroupEx = Scene.GetGroup(C1)
End if
Next
GrCount = GroupEx.GetChildCount()
Else
Title = "!!! Warning !!!"
Style = VbOKOnly
Msg = "This Animation will not be maded!"
Dim Resp2
Resp2 = MsgBox(Msg, Style, Title)
End if
End Sub
Sub AnimateGroup(Time, CanvasGroup)
If Resp = vbYes Then
Dim C2, TimEnd, TimBeg, Dper
TimBeg = FrBeg/FPS
TimEnd = FrEnd/FPS
For C2 = 0 To GrCount-1
Dper = 0
Dper = Dper+Speed
set GrEx = GroupEx.GetCild(C2)
GrEx.GetPosition GroupEx, PosX, PosY, PosZ
For Time = TimBeg To TimEnd
GrEx.SetPosition GroupEx, Timer, PosX*Dper, PosY*Dper, PosZ*Dper
Next
Next
End if
End Sub
If any one can correct this thanks Draicker2003 |
|||
|
|
Junior Member |
Hi
here is som update of explosion script if some one can correct it do it Thanks Draicker2003 Planet_Explosion.zip (1 Kb, 13 downloads) Palanet Explosion |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
3D Canvas Community
3D Canvas Discussion Forums
Plug-In Development and Scripting
Explosion Script For Planetoides
