View unanswered posts | View active topics It is currently Thu Jan 02, 2025 9:00 pm



Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
 Small question... 
Author Message
User avatar

Joined: Mon Jun 28, 2010 10:06 pm
Posts: 461
Location: STEPPING INTO THE RING
Reply with quote
Post 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!


Wed Jan 19, 2011 2:02 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post 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.


Wed Jan 19, 2011 5:40 pm
Profile
User avatar

Joined: Sun Apr 15, 2007 5:56 am
Posts: 1191
Location: outside the shithole called the University in the Forest
Reply with quote
Post 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.


Wed Jan 19, 2011 8:25 pm
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post 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.


Wed Jan 19, 2011 10:33 pm
Profile WWW
User avatar

Joined: Mon Jun 28, 2010 10:06 pm
Posts: 461
Location: STEPPING INTO THE RING
Reply with quote
Post Re: Small question...
Ok, I will ask Geti.

Also, what size is an average ModuleIcon?
30x30? Does it matter?


Wed Jan 19, 2011 11:12 pm
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post 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.


Wed Jan 19, 2011 11:19 pm
Profile WWW
User avatar

Joined: Mon Jun 28, 2010 10:06 pm
Posts: 461
Location: STEPPING INTO THE RING
Reply with quote
Post 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.


Thu Jan 20, 2011 1:45 am
Profile
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: Small question...
Yeah it can use one sound, but you gotta time it.


Thu Jan 20, 2011 1:47 am
Profile
User avatar

Joined: Mon Jun 28, 2010 10:06 pm
Posts: 461
Location: STEPPING INTO THE RING
Reply with quote
Post Re: Small question...
Would I remove
ReloadStartSound or RemoveEndSound?

Reloading is in miliseconds, right?
1000=1sec?


Thu Jan 20, 2011 1:49 am
Profile
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: Small question...
You remove the reload end.


Thu Jan 20, 2011 1:56 am
Profile
User avatar

Joined: Mon Jun 28, 2010 10:06 pm
Posts: 461
Location: STEPPING INTO THE RING
Reply with quote
Post 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.


Thu Jan 20, 2011 2:27 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: Small question...
Abortscreen jumps in lines of 100, so don't trust that. I would imagine you need to do:
Code:
ReloadEndSound = None


Thu Jan 20, 2011 5:44 pm
Profile
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: Small question...
No you just don't define it.


Thu Jan 20, 2011 5:50 pm
Profile
User avatar

Joined: Mon Jun 28, 2010 10:06 pm
Posts: 461
Location: STEPPING INTO THE RING
Reply with quote
Post 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:


Fri Jan 21, 2011 12:02 am
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post 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.


Fri Jan 21, 2011 3:45 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 16 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.058s | 13 Queries | GZIP : Off ]