Jump to content

MrMcMuffin

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by MrMcMuffin

  1. That would be better. I didn't see him use a shock cone anyways.
  2. 1252: The elevator screeches to a halt, the cable snaps and you start to fall.
  3. Granted, you receive 1 billion dollars, but it is in the form of credit card debt. I wish I had free pizza for life.
  4. Yarn and dirt indicates real fun times singing icycles Dont ask Jsoejdhs
  5. I am trying to make a highly realistic sonic boom mechanic that will work in tandem with BahamutoD's Camera Tools mod as seen here http://forum.kerbalspaceprogram.com/threads/94171-1-0-Camera-Tools-v1-3-(compatibility-fixes)-May-16. Picture this, a sonic boom is caused by the compression of sound waves. that cant keep up with a supersonic object. when an object is at a supersonic speed, the sound waves coming from it form a cone behind the object. the only place you can hear any sound the plane makes is inside that cone. As soon as you enter the cone, the sonic boom is heard. The faster the object, the skinnier the cone. Here is a friendly picture This will be added to an update for my very simple Mach Gauge Mod. I am very inexperienced with c#, so ill never accomplish this even in my dreams. The only time I want the sound cone thing to be active is when you in fly by mode in camera tools. this is so standard third person view isn't effected. I have created a checklist of what the code should do -should only work with cameratools active, and aircraft must be traveling supersonic -plane sound only heard inside cone -sonic boom sound effects I have four of them, just make it randomly choose and play one upon entrance of the cone of sound waves -use vessel.mach to get mach number, dont calculate it please if you have any questions let me know. I'll make sure all contributors get credit. Also, if you give me code, will you please tell me how to implement it, like where to put it and such. Thanks Ryan
  6. how would i give a player science without an experiment
  7. Try adding a bunch of spaces at the end of upper center message like this ScreenMessages.PostScreenMessage("You message here ", 2f, ScreenMessageStyle.UPPER_CENTER);. It's kind of crude but I think It should work.
  8. Try deleting things until u have only one of each type of part
  9. what code would i use to add experience. And how would i check game mode like career or sandbox. Thanks Ryan
  10. Hey crzyrndm, could you test my plugin for me before I get too far into it, I just don't want to have to change what could possible be 1000 lines of code. using UnityEngine; namespace Constructive_Criticism { [KSPAddon(KSPAddon.Startup.Flight, false)] public class ConstructiveCritcism : MonoBehavior { public void Start()//initialize event happened checker { GameEvents.onFlagPlant.Add(main); GameEvents.onCollision.Add(collide); GameEvents.OnLaunch.Add(launch); GameEvents.OnOverheat.Add(overheat); GameEvents.OnGUIAstronautComplexSpawn.Add(acomplex); } public void OnDestroy() { GameEvents.onFlagPlant.Remove(main); GameEvents.onCollision.Remove(collide); GameEvents.OnLaunch.Remove(launch); GameEvents.OnOverheat.Remove(overheat); GameEvents.OnGUIAstronautComplexSpawn.Remove(acomplex); } public void main(Vessel v); { string[] msgsflagplace = new string[4];// messages on flag plant event msgsflagplace[0] = "Congratulations, you have placed a flag!"; msgsflagplace[1] = "Now give yourself a pat on the back. you did good."; msgsflagplace[2] = "A new planet with a flag on it,jolly good job."; msgsflagplace[3] = "A new planet conquered!"; Random rnd = new Random(); ScreenMessages.PostScreenMessage(msgsflagplace[rnd.Next(0,2)], 3f, ScreenMessageStyle.UPPER_CENTER); } public void collide (EventReport r) { string[] msgscol = new string[5];// messages to display if you crash msgscol[0] = "Nice, you scratched the paint"; msgscol[1] = "Be carefull, there is no insurance on this craft."; msgscol[2] = "Do you have any idea how expensive rockets are?!?!?!"; msgscol[3] = "That'll leave a mark."; msgscol[4] = "you have crashed. Jeb will be proud."; Random rnd = new Random(); ScreenMessages.PostScreenMessage(msgscol[rnd.Next(0,4)], 3f, ScreenMessageStyle.UPPER_CENTER); } public void launch (EventReport l) { ScreenMessages.PostScreenMessage("Liftoff!", 2f, ScreenMessageStyle.UPPER_CENTER); } public void overheat (EventReport oh) { string[] msgsoh = new string[5];// messages to display if a part overheats msgsoh[0] = "you just voided the warranty."; msgsoh[1] = "You just lost a few parts.... no biggie."; msgsoh[2] = "Feel free to panic."; msgsoh[3] = "There is a little red bar next to the fuel bar, use it!"; msgsoh[4] = "Tip: If your engine nozzels start turning into cherries. throttle down."; Random rnd = new Random(); ScreenMessages.PostScreenMessage(msgscol[rnd.Next(0,4)], 3f, ScreenMessageStyle.UPPER_CENTER); } public void acomplex (EventVoid ac) { ScreenMessages.PostScreenMessage("Liftoff!", 2f, ScreenMessageStyle.UPPER_CENTER); } } } I hope this isn't too much to ask. thanks so much. - - - Updated - - - I'm not gonna be back from vacation til next week - - - Updated - - - Hey crzyrndm, could you test my plugin for me before I get too far into it, I just don't want to have to change what could possible be 1000 lines of code. using UnityEngine;[/FONT][FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] [/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]namespace Constructive_Criticism[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]{[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] [KSPAddon(KSPAddon.Startup.Flight, false)][/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] public class ConstructiveCritcism : MonoBehavior[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] {[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] public void Start()//initialize event happened checker[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] { [/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] GameEvents.onFlagPlant.Add(main);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] GameEvents.onCollision.Add(collide);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] GameEvents.OnLaunch.Add(launch);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] GameEvents.OnOverheat.Add(overheat);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] GameEvents.OnGUIAstronautComplexSpawn.Add(acomplex);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] }[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] public void OnDestroy()[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] {[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] GameEvents.onFlagPlant.Remove(main);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] GameEvents.onCollision.Remove(collide);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] GameEvents.OnLaunch.Remove(launch);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] GameEvents.OnOverheat.Remove(overheat);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] GameEvents.OnGUIAstronautComplexSpawn.Remove(acomplex);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] } [/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] public void main(Vessel v);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] {[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] string[] msgsflagplace = new string[4];// messages on flag plant event[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgsflagplace[0] = "Congratulations, you have placed a flag!";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgsflagplace[1] = "Now give yourself a pat on the back. you did good.";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgsflagplace[2] = "A new planet with a flag on it,jolly good job.";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgsflagplace[3] = "A new planet conquered!";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] Random rnd = new Random();[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] ScreenMessages.PostScreenMessage(msgsflagplace[rnd.Next(0,2)], 3f, ScreenMessageStyle.UPPER_CENTER);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] }[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] public void collide (EventReport r)[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] {[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] string[] msgscol = new string[5];// messages to display if you crash[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgscol[0] = "Nice, you scratched the paint";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgscol[1] = "Be carefull, there is no insurance on this craft.";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgscol[2] = "Do you have any idea how expensive rockets are?!?!?!";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgscol[3] = "That'll leave a mark.";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgscol[4] = "you have crashed. Jeb will be proud.";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] Random rnd = new Random();[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] ScreenMessages.PostScreenMessage(msgscol[rnd.Next(0,4)], 3f, ScreenMessageStyle.UPPER_CENTER);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] }[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] public void launch (EventReport l)[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] {[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] ScreenMessages.PostScreenMessage("Liftoff!", 2f, ScreenMessageStyle.UPPER_CENTER);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] }[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] public void overheat (EventReport oh)[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] {[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] string[] msgsoh = new string[5];// messages to display if a part overheats[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgsoh[0] = "you just voided the warranty.";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgsoh[1] = "You just lost a few parts.... no biggie.";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgsoh[2] = "Feel free to panic.";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgsoh[3] = "There is a little red bar next to the fuel bar, use it!";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] msgsoh[4] = "Tip: If your engine nozzels start turning into cherries. throttle down.";[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] Random rnd = new Random();[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] ScreenMessages.PostScreenMessage(msgscol[rnd.Next(0,4)], 3f, ScreenMessageStyle.UPPER_CENTER);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] }[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] public void acomplex (EventVoid ac)[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] {[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] ScreenMessages.PostScreenMessage("Liftoff!", 2f, ScreenMessageStyle.UPPER_CENTER);[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] } [/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif] }[/FONT] [FONT=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif]} I hope this isn't too much to ask. thanks so much. - - - Updated - - - I just posted that twice, stupid me, thought it didn't go through.
  11. If you want to add code type {CODE}"your code here"{/CODE} replace {} with [] your code here just thought I'd make your life easier.
  12. There is a reason for the hand holding. I'm on vacation, AFK quit literally
  13. Hi pizza boy, try going to this link http://anatid.github.io/XML-Documentation-for-the-KSP-API/class_part.html#a64e1f9b7a9419f736b4446fba5b83d22
  14. I appreciate the suggestions, but I'm on vacation so I can't test them. All I have is the rudimentary c# compiler app.
  15. How do I add more then, and will my event add code work by adding that line to start()
  16. So did I put it together correctly - - - Updated - - - What I am worried about is the screen message get random string from list code, did I do that correctly, I mean you just never mentioned that part. - - - Updated - - - public void Start() { GameEvents.onFlagPlant.Add(main); GameEvents.onCollision.Add(collide); } public void OnDestroy() { GameEvents.onFlagPlant.Remove(main); GameEvents.onCollision.Remove(collide); } here is was I did to add the new event.
  17. I thought I'd at least try so here is what I came up with, but what would I do for the other events like "OnCollision". [/FONT]using UnityEngine; namespace Constructive_Criticism { [KSPAddon(KSPAddon.Startup.Flight, false)] public class ConstructiveCritcism : MonoBehavior { public void Start() { GameEvents.onFlagPlant.Add(main); } public void OnDestroy() { GameEvents.onFlagPlant.Remove(main); } public void main(Vessel v); { string[] msgsflagplace = new string[3]; msgsflagplace[0] = "Congratulations, you have placed a flag!"; msgsflagplace[1] = "Now give yourself a pat on the back. you did good."; msgsflagplace[2] = "A new planet with a flag on it,jolly good job."; msgsflagplace[3] = "A new planet conquered!"; Random rnd = new Random(); ScreenMessages.PostScreenMessage(msgsflagplace[rnd.Next(0,2)], 3f, ScreenMessageStyle.UPPER_CENTER); } } } thanks again
  18. I want message when I reach mach one, I'm working on a solution based off of what Diazo said
  19. Whenever I reach mach one, nothing happens. No message , nothing. public void Update() { double mach; mach = vessel.mach; if (mach == 1) { ScreenMessages.PostScreenMessage("Mach 1", 2f, ScreenMessageStyle.UPPER_CENTER); } } i suck at see sharp(lol), so if you explain any revisions, will you copy and paste the code above and put the revisions in that. And then explain what you did. much appreciated, Ryan
  20. Thanks, but this is no use to me unless I see the changes put into entire code. As I said I'm very new to this. - - - Updated - - - By the way, I will be using most of the game events
×
×
  • Create New...