View unanswered posts | View active topics It is currently Mon Dec 30, 2024 9:34 pm



Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
 Adding custom bullets with specific sprites? 
Author Message
Data Realms Elite
Data Realms Elite
User avatar

Joined: Mon Jul 12, 2010 5:39 am
Posts: 4558
Reply with quote
Post Adding custom bullets with specific sprites?
So I was wondering how to create a gun that shoots a bullet that has a preset sprite instead of some random yellow dots. How do I do this?


Mon Mar 07, 2011 12:55 am
Profile WWW
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Adding custom bullets with specific sprites?
You could define the ammo as a MOSRotating. It's basically the same as defining an AEmitter, except that you skip all the emitting parts.
You can add sharpness, mass, almost anything to it.


Mon Mar 07, 2011 1: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: Adding custom bullets with specific sprites?
Even an AEmitter, for swankey trails and such.


Mon Mar 07, 2011 1:10 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Mon Jul 12, 2010 5:39 am
Posts: 4558
Reply with quote
Post Re: Adding custom bullets with specific sprites?
And how do I do any of that?


Mon Mar 07, 2011 1:12 am
Profile WWW
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Adding custom bullets with specific sprites?
Well, go and grab any AEmitter and use it as a template!
For example, go to the coalition's launchers and grab it's rocket AEmitter. Use your custom sprite, modify everything you want, even remove the emissions if you want, etc.

And there you go.


Mon Mar 07, 2011 1:21 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Mon Jul 12, 2010 5:39 am
Posts: 4558
Reply with quote
Post Re: Adding custom bullets with specific sprites?
Ah, I see now. Thanks.


Mon Mar 07, 2011 1:55 am
Profile WWW
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: Adding custom bullets with specific sprites?
Okay you guys, it sounds to me Miggles would like the simplest and Easiest way to do this.

Asklar, a MOSRotating is like an Emitter, however it isn't the greatest way to make a simple bullet, same with an AEmitter.

The simplest and easiest way to do so is to define a MOSParticle, as said above.

Though they all have their benefits i believe what you're looking for is the MOSParticle.

Unless of course you want this bullet to follow a trajectory, because MOSParticles do not have the variable: OrientToVel, which as the name states, rotates it to follow the trajectory path.
This means a MOSParticle with a sprite of a box, will always have that box perfectly horizontal at all times.

Though the points made by RoastVeg, Nos[the rest of his name] and Asklar is valid and no offence to either of them.


To everyone else, please try to explain stuffs before you post, also find the MOST direct way of doing something.

edit: If further question is required, you can define a MOPixel as a MOSParticle instead and then just add a sprite to it.
Without the color variable.

Aka:
Code:
   SpriteFile = ContentFile
      FilePath = Koopa Troopa.rte/Weapons/Hammer/HammerA.bmp
   FrameCount = 8
   SpriteAnimMode = 1
   SpriteAnimDuration = 1000
   SpriteOffset = Vector
      X = 0
      Y = 0


Mon Mar 07, 2011 2:37 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Adding custom bullets with specific sprites?
MOSParticles, I never paid attention to those.

In my opinion, there should be more guides on how to make guns, but more complex ones, because right now the only guides that there are are mainly to introduce basic gun making.
One that covered many types of proyectiles, differences, basic scripts, etc., I think that in that way there would be much more variation on guns, because people tend to use mainly MOPixels for almost anything and AEmitters for heavy weapons, and MOSParticles could perfectly be used instead.

Something like that is needed.


Wed Mar 09, 2011 3:05 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: Adding custom bullets with specific sprites?
I've seen MOSRotatings used a lot. They're really good for when you want something to behave like an actor without actually being one.


Wed Mar 09, 2011 6:00 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Mon Jul 12, 2010 5:39 am
Posts: 4558
Reply with quote
Post Re: Adding custom bullets with specific sprites?
Ok. I defined it as a MOSParticle. I followed your instructions. I added the sprite.
There's some error with line 8.


Attachments:
File comment: Here
1SMGB25.rte.rar [354.81 KiB]
Downloaded 180 times
Fri Mar 11, 2011 12:44 am
Profile WWW
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Adding custom bullets with specific sprites?
Why didn't you simply copy and paste the relevant part of the code instead of posting the entire RTE?


Fri Mar 11, 2011 12:52 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Mon Jul 12, 2010 5:39 am
Posts: 4558
Reply with quote
Post Re: Adding custom bullets with specific sprites?
I don't know. I felt like it.


Fri Mar 11, 2011 1:51 am
Profile WWW
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: Adding custom bullets with specific sprites?
Which gun?


Fri Mar 11, 2011 1:58 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Mon Jul 12, 2010 5:39 am
Posts: 4558
Reply with quote
Post Re: Adding custom bullets with specific sprites?
125.ini.


Fri Mar 11, 2011 2:07 am
Profile WWW
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: Adding custom bullets with specific sprites?
There are syntax errors and presetname always goes first when defining an object.
Code:
AddAmmo = Round
   PresetName = Round Kniferrifle
   ParticleCount = 1
   Particle = MOSParticle
   >tab>SpriteFile = ContentFile
      >tab>FilePath = 1SMGB25.rte/Devices/Knife.bmp
      Move Under Particle =>PresetName = Particle Kniferrifle
      Mass = 0.008
      RestThreshold = 500
      LifeTime = 1500
      Sharpness = 250
      HitsMOs = 1
      GetsHitByMOs = 0
      Color = Color
         R = 143
         G = 143
         B = 143
      Atom = Atom
         Material = Material
            CopyOf = Bullet Metal
   Shell = MOSParticle
      CopyOf = Casing
   FireVelocity = 80
   ShellVelocity = 10
   Separation = 5


Fri Mar 11, 2011 2:50 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 18 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.041s | 14 Queries | GZIP : Off ]