logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,537
Total Threads: 8,626
Posts: 94,207

Administrators:
DeeZire, Redemption

There are currently 108 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 02-26-2008, 10:09 PM   #1 (permalink)
Junior Member
 
Join Date: Feb 2008
Posts: 4
Default Creating projectiles

I am creating my own personal mod that may be released sooner or later but I am running into problems.

In trying to make Rangers/Red Guard/Rebels and eventually Quads/gattling tanks shoot inaccurately (or at least appear to) I need to make a projectile, because default they use PROJECTILE = NONE, and thus the "ScatterRadius" function doesn't work.

For test purposes I'm using the "Vietnam Glory Obscured" projectile for m60 gunners until I create my own, because they seem to have got it right, So I'm borrowing their w3d files and such until then.

I am pretty familiar with the .ini files as I've already done alot, but this still stumps me. I have no idea on how to code a new projectile into all the .ini files or whatever.


Any ideas?
destructhor is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-27-2008, 10:40 PM   #2 (permalink)
Senior Member
 
CommieDog's Avatar
 
Join Date: Oct 2004
Location: Alaska (Hell Frozen Over)
Posts: 368
Default

You can easily create new projectiles by cloning existing ones (or copying the current projectile you're using). You might want to get rid of the W3DDrawModule code if you want the projectile to be invisible, though.
CommieDog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-27-2008, 11:39 PM   #3 (permalink)
Junior Member
 
Join Date: Feb 2008
Posts: 4
Default

OK After about 3 and a half hours of trial and error, i managed to get the projectile coded into everything and it works. Rangers/Rebels/Redguard now have weapons that shoot in a scattered formation, not perfectly straight and they leave dust clouds where the bullets land.

This is the way its supposed to look

sshot004.jpg


However, new problem (in picture)

sshot008.jpg


You can't really see, but I have the tracers of the projectile ALONG WITH these weird red/purple/blue tracers. 2 hours later I still can't figure out how to get rid of them. They don't appear alone, they appear with the regular tracers, so for 3 bullets, you get 6 tracers.

The odd thing is the code is the same as the Vietnam Glory Obscured mod shown in the first picture.
destructhor is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2008, 12:16 AM   #4 (permalink)
Senior Member
 
Join Date: Jan 2008
Posts: 188
Default

I don't have that mod so i don't know what they did, but tracers are usually defined in the FX list that is called by the Weapon's FireFX line in weapon.ini. Look at your FireFX in weapon.ini, then look up the FX list in FXList.ini to change the tracers.

If you are using projectiles, why not just do away with tracer effects altogether? The point of tracer effects it to make it look like non-projectile weapons fire projectiles. If you use projectiles, it looks better to show the projectiles.

You can use the tank shell model or the flashbang grenade model for the projectile, just scale them down by using Scale = 0.7 or some other scale factor to make them look smaller. You can also try using the model from the Spectre howitzer shell as it looks like a tracer, you have to scale that one down a lot as it is quite big.

Also note that scatter radius is fine for anti-ground weapons but won't work for anti-air weapons.
beng is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2008, 02:07 PM   #5 (permalink)
Junior Member
 
Join Date: Feb 2008
Posts: 4
Default

Well I got the whole thing to work perfectly, except for one thing.

The projectiles do not come from the barrel of the guns of infantry, they start at their feet and move towards the target along the ground....
destructhor is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2008, 03:05 PM   #6 (permalink)
Senior Member
 
Join Date: Jan 2008
Posts: 188
Default

That is caused by the WeaponLaunchBone for the projectile weapon slot in the W3DModeldraw module either not being defined, or using a bone that does not exist in the model, or the bone is spelt wrong. Just see any unit that launches projectiles, like stinger soldiers, to see how it's done.
beng is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2008, 04:21 PM   #7 (permalink)
Junior Member
 
Join Date: Feb 2008
Posts: 4
Default

Quote:
Originally Posted by beng View Post
That is caused by the WeaponLaunchBone for the projectile weapon slot in the W3DModeldraw module either not being defined, or using a bone that does not exist in the model, or the bone is spelt wrong. Just see any unit that launches projectiles, like stinger soldiers, to see how it's done.

You are right, because I looked at AmericaInfantry.ini and changed the "WeaponLaunchBone = SECONDARY Muzzle" to PRIMARY Muzzle just to see if it would work and the projectiles launched from the gun correctly. I changed it back to what it was because flashbangs use that SECONDARY Muzzle variable.

Hopefully i'll figure it out
destructhor is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-28-2008, 06:33 PM   #8 (permalink)
Senior Member
 
Join Date: Jan 2008
Posts: 188
Default

If you have 2 weapons, and 1 launch bone, set both to use the same launch bone, ie

WeaponLaunchBone = PRIMARY Muzzle
WeaponLaunchBone = SECONDARY Muzzle

Normally you will have all weapon slots using the same launch bone unless you have different launch bones for different guns, like for the battleship which has the primary weapon using one set of launch bones and the secondary weapon using a different set, or the Comanche which has the secondary and tertiary weapons using different bones.

Don't forget to also set the FireFXBone and Muzzle flash if you have one.
beng is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:00 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.0 Release Candidate 2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.