View unanswered posts | View active topics It is currently Sat Dec 28, 2024 3:34 pm



Reply to topic  [ 11 posts ] 
 Gun firing issues [See third post] 
Author Message

Joined: Mon Aug 08, 2011 6:17 pm
Posts: 14
Reply with quote
Post Gun firing issues [See third post]
I've been looking through the list of things to check for, and they all point to the fact that sprite issues are caused by colors not being in the game's palette. Thing is, I'm using the palette for Photoshop that was provided from the list, so the colors should be there. I'm trying to make a mass driver of sorts, something to hurl a large projectile at the enemy. The sprite is attached below, perhaps one of you could help me find the issue?

Second, when using the weapon ingame, it has a nasty tendency to shred the user when fired. I've tried to mess around with all the offsets I can find, but the weapon never changes position when held, and the slug always comes from the same position (apparently, inside the poor soldier's chest).

The .ini's are both from vanilla parts of the game, for use as a template, with the exception of the ammo.ini, which is ripped from MaximDude Corp, by MaximDude. He made a static turret that does what I want this gun to do, so I figured it would work.


Attachments:
File comment: Weapon Sprite
MassDriver.bmp [1.02 KiB]
Not downloaded yet
File comment: Weapon .ini
Mass Driver.ini [2.92 KiB]
Downloaded 181 times
File comment: Slug and Casing .ini
Ammo.ini [1.44 KiB]
Downloaded 174 times


Last edited by Workin on Tue Dec 27, 2011 6:01 am, edited 1 time in total.

Tue Dec 27, 2011 4:46 am
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: Sprite and Offset issues.
If you're having offset issues, I strongly recommend you read this offset determination guide, because if I try to calculate the offsets based on the ones you provided? They're pretty ♠♣♥♦ing crazy and don't match the sprite at all. I mean absolutely nonsensical. The Joint/Support offsets don't line up with either of the grips if calculated off the SpriteOffset, the SpriteOffset aka center of mass is almost at the muzzle itself, and the MuzzleOffset appears to be off the edge of the sprite entirely.

Offsets other than the SpriteOffset are determined by their distance relative to the SpriteOffset itself, not their position on the sprite itself. There are a couple of other rules that the guide explains such as positive/negative numbering you need to keep in mind as well, so make sure you read it properly.

The sprite itself checks out and the colours are okay, but I think it needs to be in Indexed mode, not RGB mode. I have no idea how to do this in Photoshop, unfortunately.


Tue Dec 27, 2011 4:57 am
Profile YIM

Joined: Mon Aug 08, 2011 6:17 pm
Posts: 14
Reply with quote
Post Re: Sprite and Offset issues.
That's probably from me doing it by guess and check, which is admittedly a crappy method. Thanks for the link, looks like it should clear it up. The indexed vs. RGB is probably how I saved it, I didn't realize there was a difference. Thanks for the help, I'll edit this post if any more issues come up.

EDIT: Wow, things sure work a lot better when you follow instructions. For future reference, to change a graphic to indexed or RGB or what have you, it's simply Image > Mode > Whatever mode you need.

EDIT EDIT: Unfortunately, even after sorting the offsets and the color issue out, the actor is still being torn apart when the gun is fired. I've uploaded the entire .rte as a zipped file in this post, if anyone can see what's wrong with it, I would very much appreciate it.


Attachments:
Test.rte.zip [18.2 KiB]
Downloaded 164 times
Tue Dec 27, 2011 5:14 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Gun firing issues [See third post]
Your problem is your weapon itself. You're firing a 60kg slug at 120, and that recoil is felt by the actor. You either have to make some sort of recoil cancelling fix (such as a Lua file attached to your slug that changes its weight from ini-defined 0.1 to the weight you want) or change the gun to be more sane.


Tue Dec 27, 2011 7:56 am
Profile
User avatar

Joined: Fri Apr 30, 2010 2:12 pm
Posts: 560
Reply with quote
Post Re: Gun firing issues [See third post]
Or use insanely strong actors with huge strength in arm joints and heavy weight.


Tue Dec 27, 2011 8:31 am
Profile

Joined: Sat Oct 22, 2011 8:07 pm
Posts: 149
Reply with quote
Post Re: Gun firing issues [See third post]
Duh102 wrote:
Your problem is your weapon itself. You're firing a 60kg slug at 120, and that recoil is felt by the actor. You either have to make some sort of recoil cancelling fix (such as a Lua file attached to your slug that changes its weight from ini-defined 0.1 to the weight you want) or change the gun to be more sane.
Naxete wrote:
Or use insanely strong actors with huge strength in arm joints and heavy weight.

Wouldn't an AEmitter work just as good?


Tue Dec 27, 2011 10:43 am
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: Gun firing issues [See third post]
You mean fire a near-weightless AEmitter that lasts just long enough to spawn the projectile? I think that would work, yes. I used a similar trick to make a shotgun that can fire buckshot and slug rounds.


Tue Dec 27, 2011 11:11 am
Profile YIM
User avatar

Joined: Fri Apr 30, 2010 2:12 pm
Posts: 560
Reply with quote
Post Re: Gun firing issues [See third post]
The Chairman wrote:
Wouldn't an AEmitter work just as good?

That's the option which Duh suggested, the best one to be honest.
You have a good example of it in coalition heavy sniper round :wink:


Tue Dec 27, 2011 12:44 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Gun firing issues [See third post]
AEmitter method is harder than what I suggested. Enter the following into a .txt file, save, change the extension to .lua.
Code:
function Create(self)
self.Mass = 60;
end

Move it to where your .ini is, then in the .ini, in your shot's definition, replace your weight definition with the following two lines.
Code:
Mass = 0.1
ScriptPath = (path to your .lua)/(nameofluafile).lua


Tue Dec 27, 2011 3:59 pm
Profile
User avatar

Joined: Fri Apr 30, 2010 2:12 pm
Posts: 560
Reply with quote
Post Re: Gun firing issues [See third post]
Very simple yet interesting script :-?
I'll keep this one in my pocket, thanks duh.


Tue Dec 27, 2011 4:37 pm
Profile

Joined: Mon Aug 08, 2011 6:17 pm
Posts: 14
Reply with quote
Post Re: Gun firing issues [See third post]
Well insanity is how I play this game, so lua it is. Thanks so much for the help!


Tue Dec 27, 2011 10:36 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: Google [Bot]


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.040s | 16 Queries | GZIP : Off ]