Jump to content

[1.0.x]Destruction Effects (flames and smoke on joint breaks)


BahamutoD

Recommended Posts

11 hours ago, SpannerMonkey(smce) said:

I'll be sure to push them up as soon as I'm happy with the overall appearance.

By that do you means as in making the flame look realistic or spraying bugs with coding?

Link to comment
Share on other sites

@SpannerMonkey(smce), ive back to working on altering this mod (spent a while doing a cloud mod and a few maps for a RTS i play), and there is still one thing that drives me up the wall...

The stupid compiler refuses to accept the following line in the code:

var velocity = Part?.GetComponent<Rigidbody>().velocity ?? Rb.velocity;

This is highlighted in red:

.GetComponent<Rigidbody>().velocity ?? Rb.velocity

Im a noob at coding so i have no idea why this isnt working?  I have VS set up 100% correctly (according to wiki) as it is now (i can compile other mods fine), i have the references the same as you have, and it makes no sense to me why it doesnt let me compile that one line of code...  Did the version of .net framework change or something since U5 was updated?

If you have any time id appreciate some help with this, i really want to start working on this mod legit, but without the ability to compile (i need to be able to edit the particle spawn timer to mess with effects, and i need to get rid of the vaccum effects disabling code so i can actually use this in space with my capital ship battles) i cant really do much to work on this...

Link to comment
Share on other sites

11 hours ago, panzer1b said:

The stupid compiler refuses to accept the following line in the code:

Hi, got to say that I'm a complete noob too when it comes to coding, and  usually get by by just fixing the error that the console gives me, Rb  should be rb i think though,  so what does the  error code say?   As long as you are using the latest DLL references there should be no issues with that side of things .  The best person to ask would be @jrodriguez as he's considerably more gifted in code Fu than i am, but if you give me a link to your code I'd be happy to see if i could fix it, i do seem to be getting a little luckier of late :) 

Link to comment
Share on other sites

On 11/20/2016 at 10:40 AM, SpannerMonkey(smce) said:

Hi, got to say that I'm a complete noob too when it comes to coding, and  usually get by by just fixing the error that the console gives me, Rb  should be rb i think though,  so what does the  error code say?   As long as you are using the latest DLL references there should be no issues with that side of things .  The best person to ask would be @jrodriguez as he's considerably more gifted in code Fu than i am, but if you give me a link to your code I'd be happy to see if i could fix it, i do seem to be getting a little luckier of late :) 

Im literally trying to compile the exact same code found on github (the latest version).  Im getting stuck on the line i mentioned above in the DEGaplessParticleEmitter.cs file.  i can upload my entire code folder if this will be of help, but sofar i just dont get why you are able to compile it and im not even if its the exact same code?  Something has to be wrong with my compiler setup as i cant think of any other possible reason why it wont compile...

Link to comment
Share on other sites

30 minutes ago, panzer1b said:

Im literally trying to compile the exact same code found on github (the latest version).  Im getting stuck on the line i mentioned above in the DEGaplessParticleEmitter.cs file.  i can upload my entire code folder if this will be of help, but sofar i just dont get why you are able to compile it and im not even if its the exact same code?  Something has to be wrong with my compiler setup as i cant think of any other possible reason why it wont compile...

Are you using VS2015?

var velocity = Part?.GetComponent<Rigidbody>().velocity ?? Rb.velocity;

? is a null propagation feature implemented as part of C# 6.0 which requires VS2015.

 ? is equivalent to

var velocity = null or default value

if( Part != null){

velocity = Part.GetComponent...

}

 

 

 

Edited by jrodriguez
Link to comment
Share on other sites

26 minutes ago, panzer1b said:

Im literally trying to compile the exact same code found on github (the latest version).  Something has to be wrong with my compiler setup as i cant think of any other possible reason why it wont compile...

Well in that case I'm stumped as I've just run a rebuild of the same code and it compiled and works fine, you must have an out of date reference or something similar, as the RB changed a couple of days before ksp1.2.1 popped,  See below compiler shot and ref's

Spoiler

N7L4Dyf.png

 

Link to comment
Share on other sites

On 11/21/2016 at 2:14 PM, jrodriguez said:

Are you using VS2015?

var velocity = Part?.GetComponent<Rigidbody>().velocity ?? Rb.velocity;

? is a null propagation feature implemented as part of C# 6.0 which requires VS2015.

 ? is equivalent to

var velocity = null or default value

if( Part != null){

velocity = Part.GetComponent...

}

 

 

 

Guess i need to update, been on 2012 for a while now...

Thanks for the advice!

Link to comment
Share on other sites

15 minutes ago, Probus said:

Did I miss a link to the updated version of this?

We currently can't edit the OP so most links will be buried in thread, though i wouldn't swear to there ever being one for the latest, in which case  you'll need this

https://github.com/jrodrigv/DestructionEffects/releases/download/v1.2.0/DestructionEffects.1.2.0_11172016.zip

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
1 hour ago, jrodriguez said:

Hi all,

I have finally created the new thread for this mod with a link to the new release for KSP 1.2.2!

Regards

@BahamutoD It would be great if you can update the OP :) . And maybe we can lock this thread.

 

Great.  You can ask the moderators to lock the thread when it's been updated

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...