Data Realms Fan Forums http://45.55.195.193/ |
|
Small question... http://45.55.195.193/viewtopic.php?f=1&t=21173 |
Page 1 of 2 |
Author: | Darkdoom [ Wed Jan 19, 2011 2:02 am ] |
Post subject: | Small question... |
Here is the rundown. I am making a pack of extremely overpowered guns, like a pistol that rips enemies to blood and gore... but can only for 5 shots total, etc. (these will probably just be for personal use, but I might release if people think it is a good idea. I will put a working version up as soon as I can.) I need a laser guide on a handgun, a red line that extends from a certain point, and ends on contact with another non-null pixel. I have no idea how to do this, and a search does not really help. A code example would be great. Thanks! |
Author: | Roast Veg [ Wed Jan 19, 2011 5:40 pm ] |
Post subject: | Re: Small question... |
Attach an emitter to the gun that fires invisible MOPixels that have a red glow on them and a tiny impulse limit. |
Author: | The Fat Sand Rat [ Wed Jan 19, 2011 8:25 pm ] |
Post subject: | Re: Small question... |
While Roast Veg's idea is good, it may result in something with visible bend in the beam when you move it. I'd look at the code for the Darkstorm sniper rifles, as iirc those have decent laser sights. Since those only create a dot at the aimpoint, and not a line to it I'm uncertain if they'll be modifiable to the state you want, but they may at least give you a frame of reference. |
Author: | 411570N3 [ Wed Jan 19, 2011 10:33 pm ] |
Post subject: | Re: Small question... |
Geti's laser pointer may be something like what you want. A solild, unbroken beam is sort of laggy. If you don't care for messing with Lua, then the emitter method works well enough, but remember to have two emitters pointing both directions, because they won't flip with the gun, if I remember correctly. |
Author: | Darkdoom [ Wed Jan 19, 2011 11:12 pm ] |
Post subject: | Re: Small question... |
Ok, I will ask Geti. Also, what size is an average ModuleIcon? 30x30? Does it matter? |
Author: | 411570N3 [ Wed Jan 19, 2011 11:19 pm ] |
Post subject: | Re: Small question... |
If it's too big it will get scaled. You might want to keep it small to keep the buy menu uncluttered, though. |
Author: | Darkdoom [ Thu Jan 20, 2011 1:45 am ] |
Post subject: | Re: Small question... |
And another thing... (lol allusion) Can a reload use one sound, or do I have to split the sound into a beginning and end. |
Author: | Lizardheim [ Thu Jan 20, 2011 1:47 am ] |
Post subject: | Re: Small question... |
Yeah it can use one sound, but you gotta time it. |
Author: | Darkdoom [ Thu Jan 20, 2011 1:49 am ] |
Post subject: | Re: Small question... |
Would I remove ReloadStartSound or RemoveEndSound? Reloading is in miliseconds, right? 1000=1sec? |
Author: | Lizardheim [ Thu Jan 20, 2011 1:56 am ] |
Post subject: | Re: Small question... |
You remove the reload end. |
Author: | Darkdoom [ Thu Jan 20, 2011 2:27 am ] |
Post subject: | Re: Small question... |
this is strange... I have a basic gun ini, but cc keeps crashing saying error at line 1, it is just AddAmmo = Round. Nothing else anywhere near it could be breaking it as far as I can tell. What could be wrong? ps, I looked in AbortScreen and such, it DOES say line 1. |
Author: | Roast Veg [ Thu Jan 20, 2011 5:44 pm ] |
Post subject: | Re: Small question... |
Abortscreen jumps in lines of 100, so don't trust that. I would imagine you need to do: Code: ReloadEndSound = None |
Author: | Lizardheim [ Thu Jan 20, 2011 5:50 pm ] |
Post subject: | Re: Small question... |
No you just don't define it. |
Author: | Darkdoom [ Fri Jan 21, 2011 12:02 am ] |
Post subject: | Re: Small question... |
What is strange is that I added a commented line on line 1, and moved AddAmmo down one line. Now it says line 2, but I will look around in the code to see if I have an error somewhere, I dont know where it would be... maybe the mass is too high (is 5 too high for a round, speaking in terms of possibility?) Also... for sprites, if you have two, it would be like GUN000.bmp or GUN0000.bmp in the sprite call, would you put GUN000.bmp or GUN.bmp? And, do you have to call a certain thing like "OnFire = blah blah blah" to use the 2nd frame? I feel like such a noob D: |
Author: | 411570N3 [ Fri Jan 21, 2011 3:45 am ] |
Post subject: | Re: Small question... |
With more than one frame, you give the filepath Sprite.bmp. CC will look for the files Sprite000.bmp, Sprite001.bmp, etc. With one frame, CC will look for the file Sprite.bmp. |
Page 1 of 2 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |