Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Charging Gun
Charging Gun [message #374314] Mon, 02 March 2009 01:04 Go to next message
sauron--the--king is currently offline  sauron--the--king
Messages: 64
Registered: November 2008
Location: Holland
Karma: 0
Recruit
Hello,
I am making a weapon that first has to charge, where you can see an animation, and than shoots. So the only thing I need to know, is how to get the weapon shooting after about 2 seconds. You should be able to run while charging the weapon to shoot. The animation of the charging weapon must be shown at the time you click on the mouse, 2 seconds later it must shoot. Could anyone help plz?
Kind Regards,
Brian
Re: Charging Gun [message #374326 is a reply to message #374314] Mon, 02 March 2009 01:56 Go to previous messageGo to next message
Veyrdite is currently offline  Veyrdite
Messages: 1471
Registered: August 2006
Location: Australia, Sydney
Karma: 0
General (1 Star)
The weapon's ammo preset should have an option called ChargeTime - that is what you need to edit.
index.php?t=getfile&id=9634&private=0


WOL: Veyrdite Previously: Dthdealer ( a long time ago )

[Updated on: Mon, 02 March 2009 01:59]

Report message to a moderator

Re: Charging Gun [message #374337 is a reply to message #374314] Mon, 02 March 2009 03:48 Go to previous messageGo to next message
Dreganius is currently offline  Dreganius
Messages: 780
Registered: April 2007
Location: Melbourne, Australia
Karma: 0
Colonel
I was wondering this myself, for in the Ren40k mod the Assault Cannon will need to 'wind up' before it can begin firing.

Thanks for the help, it'll come in handy for a lot of us! Big Ups


http://www.ren40k.net/RenX40kSignature.jpg
Heresy grows from idleness!
Re: Charging Gun [message #374366 is a reply to message #374314] Mon, 02 March 2009 06:29 Go to previous messageGo to next message
GEORGE ZIMMER is currently offline  GEORGE ZIMMER
Messages: 2605
Registered: March 2006
Karma: 0
General (2 Stars)
Sadly, you can't make it charge then unleash dozens of bullets. It'd have to charge individually for each bullet. Which really sucks.

Still works for single fire weapons, though.


Toggle Spoiler
Re: Charging Gun [message #374373 is a reply to message #374366] Mon, 02 March 2009 07:20 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3811
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Cabal8616 wrote on Mon, 02 March 2009 06:29

Sadly, you can't make it charge then unleash dozens of bullets. It'd have to charge individually for each bullet. Which really sucks.

Still works for single fire weapons, though.

You could script it to play a charging sound when the mouse button was clicked, and then after a certain amount of time transfer some ammo over into you current clip, allowing you to shoot, once you quit shooting for a bit you would then just set the ammo on the current clip back to zero, transferring all the rest of the ammo back to your backpack rounds.


Re: Charging Gun [message #374379 is a reply to message #374373] Mon, 02 March 2009 07:54 Go to previous messageGo to next message
GEORGE ZIMMER is currently offline  GEORGE ZIMMER
Messages: 2605
Registered: March 2006
Karma: 0
General (2 Stars)
Jerad Gray wrote on Mon, 02 March 2009 08:20

Cabal8616 wrote on Mon, 02 March 2009 06:29

Sadly, you can't make it charge then unleash dozens of bullets. It'd have to charge individually for each bullet. Which really sucks.

Still works for single fire weapons, though.

You could script it to play a charging sound when the mouse button was clicked, and then after a certain amount of time transfer some ammo over into you current clip, allowing you to shoot, once you quit shooting for a bit you would then just set the ammo on the current clip back to zero, transferring all the rest of the ammo back to your backpack rounds.

Well yeah, but I kinda doubt this person has the ability to do something like that. Hell, even I don't quite know how to do that.


Toggle Spoiler
Re: Charging Gun [message #374423 is a reply to message #374326] Mon, 02 March 2009 11:33 Go to previous messageGo to next message
sauron--the--king is currently offline  sauron--the--king
Messages: 64
Registered: November 2008
Location: Holland
Karma: 0
Recruit
Dthdealer wrote on Mon, 02 March 2009 09:56

The weapon's ammo preset should have an option called ChargeTime - that is what you need to edit.
index.php?t=getfile&id=9634&private=0


Hi,
I tried ChargeTime, but this wasn't what I'm looking for.
My weapon is like a steel pipe, it takes about 1 second
before you hit your target, because you have to swing the
weapon first. When I adjust the "ChargeTime", it just waits 1
second before even showing the animation, than it shows the
animation but the enemy is dead before swinging the weapon.
But thanks for trying to help me Big Grin
Do you or does anyone else know how to get this weapon first swing
and then hurt you opponent?
Kind Regards,
Brian

[Updated on: Mon, 02 March 2009 11:34]

Report message to a moderator

Re: Charging Gun [message #374502 is a reply to message #374379] Mon, 02 March 2009 17:54 Go to previous messageGo to next message
Dreganius is currently offline  Dreganius
Messages: 780
Registered: April 2007
Location: Melbourne, Australia
Karma: 0
Colonel
Cabal8616 wrote on Tue, 03 March 2009 01:54

Jerad Gray wrote on Mon, 02 March 2009 08:20

Cabal8616 wrote on Mon, 02 March 2009 06:29

Sadly, you can't make it charge then unleash dozens of bullets. It'd have to charge individually for each bullet. Which really sucks.

Still works for single fire weapons, though.

You could script it to play a charging sound when the mouse button was clicked, and then after a certain amount of time transfer some ammo over into you current clip, allowing you to shoot, once you quit shooting for a bit you would then just set the ammo on the current clip back to zero, transferring all the rest of the ammo back to your backpack rounds.

Well yeah, but I kinda doubt this person has the ability to do something like that. Hell, even I don't quite know how to do that.


Well, I'm not necessarily the one who's coding Wink
But thanks, Jerad, that sounds promising.


http://www.ren40k.net/RenX40kSignature.jpg
Heresy grows from idleness!
Re: Charging Gun [message #374548 is a reply to message #374314] Tue, 03 March 2009 00:52 Go to previous messageGo to next message
Veyrdite is currently offline  Veyrdite
Messages: 1471
Registered: August 2006
Location: Australia, Sydney
Karma: 0
General (1 Star)
I think there is a JFW script that plays an animation on_fire

WOL: Veyrdite Previously: Dthdealer ( a long time ago )
Re: Charging Gun [message #374606 is a reply to message #374423] Tue, 03 March 2009 10:24 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3811
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
sauron--the--king wrote on Mon, 02 March 2009 11:33

Dthdealer wrote on Mon, 02 March 2009 09:56

The weapon's ammo preset should have an option called ChargeTime - that is what you need to edit.
index.php?t=getfile&id=9634&private=0


Hi,
I tried ChargeTime, but this wasn't what I'm looking for.
My weapon is like a steel pipe, it takes about 1 second
before you hit your target, because you have to swing the
weapon first. When I adjust the "ChargeTime", it just waits 1
second before even showing the animation, than it shows the
animation but the enemy is dead before swinging the weapon.
But thanks for trying to help me Big Grin
Do you or does anyone else know how to get this weapon first swing
and then hurt you opponent?
Kind Regards,
Brian


Just slow the projectile down (maybe give it a bit of a spray to make up for its slowness)?


Re: Charging Gun [message #374777 is a reply to message #374606] Wed, 04 March 2009 09:06 Go to previous messageGo to next message
sauron--the--king is currently offline  sauron--the--king
Messages: 64
Registered: November 2008
Location: Holland
Karma: 0
Recruit
Jerad Gray wrote on Tue, 03 March 2009 11:24

sauron--the--king wrote on Mon, 02 March 2009 11:33

Dthdealer wrote on Mon, 02 March 2009 09:56

The weapon's ammo preset should have an option called ChargeTime - that is what you need to edit.
index.php?t=getfile&id=9634&private=0


Hi,
I tried ChargeTime, but this wasn't what I'm looking for.
My weapon is like a steel pipe, it takes about 1 second
before you hit your target, because you have to swing the
weapon first. When I adjust the "ChargeTime", it just waits 1
second before even showing the animation, than it shows the
animation but the enemy is dead before swinging the weapon.
But thanks for trying to help me Big Grin
Do you or does anyone else know how to get this weapon first swing
and then hurt you opponent?
Kind Regards,
Brian


Just slow the projectile down (maybe give it a bit of a spray to make up for its slowness)?


Hi,
If you are slowing the projectile down, I don't think it will matter, because it's an melee weapon, if you are in melee range of your target you will always hit the enemy within a second. Because you will most of the time run against the enemy and than "shoot". So the projectile won't travel a distance most of the time I suppose.
Kind regards,
Brian

[Updated on: Wed, 04 March 2009 09:07]

Report message to a moderator

Re: Charging Gun [message #374785 is a reply to message #374314] Wed, 04 March 2009 09:19 Go to previous messageGo to next message
GEORGE ZIMMER is currently offline  GEORGE ZIMMER
Messages: 2605
Registered: March 2006
Karma: 0
General (2 Stars)
I see what he means. Basically the same thing with Reborn's crowbar- the animation makes it appear slow, but the actual hit is instant. He wants to make it so the animation and actual projectile firing are synced.

Toggle Spoiler
Re: Charging Gun [message #374795 is a reply to message #374785] Wed, 04 March 2009 10:46 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3811
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Well the answer is simple, change the animation, or as I've said, slow the projectile down, no real other way to do it under scripts 3.4.4, never know, 4.0 might have you covered be there is no way telling when thats going to come out...

Cabal8616 wrote on Wed, 04 March 2009 09:19

I see what he means. Basically the same thing with Reborn's crowbar- the animation makes it appear slow, but the actual hit is instant. He wants to make it so the animation and actual projectile firing are synced.

And yes I know, but thats quite impossible with 3.4.4, you can only do things like make the project appear like its hitting at the same instance by making it travel slow. You could do some fancy stuff with scripting and damage detection attaching a timer to the object when the weapon shoots you, then when the timer expires if your still in range of the person apply the damage, but that has some obvious flaws...
Personally I'd rather just either redo the animation, or wait for 4.0 and see if they have rigged up animations for first hand models, as then you could use a script to make it so that when you click the animation starts, that way as long as you were holding it charge time would fire and it'd work.

Also keep in mind a lot of people don't play Renegade in first person...


[Updated on: Wed, 04 March 2009 10:48]

Report message to a moderator

Re: Charging Gun [message #374814 is a reply to message #374795] Wed, 04 March 2009 12:09 Go to previous message
sauron--the--king is currently offline  sauron--the--king
Messages: 64
Registered: November 2008
Location: Holland
Karma: 0
Recruit
Hey,
I will wait for the 4.0. Maybe then it will be
easier. Thanks for your help guys Satisfied
Kind regards,
Brian Thumbs Up
Previous Topic: Windows 7 + Renegade / Modding Tools
Next Topic: Making a mod work for a server
Goto Forum:
  


Current Time: Sun Dec 01 05:36:29 MST 2024

Total time taken to generate the page: 0.00953 seconds