Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Is it possible to create a "I'm reloading!" alert?
Is it possible to create a "I'm reloading!" alert? [message #432688] Tue, 13 July 2010 10:20 Go to next message
TNaismith
Messages: 86
Registered: May 2006
Location: Canada
Karma: 0
Recruit
Is it possible to create a "I'm reloading!" alert?

Being from the realm of co-op gaming, there are many constant concepts/ideas for co-op gameplay in other games that I sometimes wonder if it can be simulated here in Renegade. Take the game Left4Dead for example, in that game teamwork is emphasized to the point where there are actual audio triggers played to the team whenever someone runs out of a clip and has to reload.

A subsequent "I'm reloading!" or "Reloading, covering fire!" is heard, and the rest of the team (sub-consciously or not) usually move to cover their teammate while he/she reloads.

I play on the Renegade Co-op servers, and so it would ideally be implemented in that kind of setting -- if anyone from the AOW/Marathon/Snipers side of Renegade like it, then that is fine too. But this is request mostly for the co-op servers.

Is this idea possible to implement into Renegade? Create a script/server-side option to toggle on and off where every time a player reloads, some kind of A) Audio alert B) Text notification in the chat, is sent to the entire team.

One problem I see is that since Renegade Co-Op servers don't force players as close together as Left4Dead does, it would be annoying in Renegade to hear a teammate saying "Reloading! Cover me!" when your on opposite sides of the map. Some kind of proximity limitation would be required then, something like "If player is outside x range, then do not trigger "Reloading" alert"

So the first step would be to ask; Is it even possible to create a script that can read when a player is reloading his/her gun or not?


http://img33.imageshack.us/img33/7928/t2010021mcsig140.gif
Re: Is it possible to create a "I'm reloading!" alert? [message #432690 is a reply to message #432688] Tue, 13 July 2010 10:40 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
All of what you mentioned is possible, although I do not know if there is an appropriate sound in renegade's always.dat to play.

For the script, you could make something like...

semi-psuedocode
bool is_reloading(){ //shitty hack tbh
if loaded ammo value equals 0 and clip contains more bullets{
return true;
}
else{
return false;
}
}

Then you'd have to call that function over and over every second or so on each player. It's a hack really, and not too pretty, but it would work.
If it returned true, then you'd play the sound at the players bone, so it gave the ranged effect you're after, and then make the server type the chat out from their character.
You'd also have to add some padding around the function so if it returned true, it didn't do the check for a little while (as it could potentially return true several times before they've finished reloading if the weapons takes a long time to reload, and you're checking it every 1 second.

However, this would only work when the player runs out of bullets and is forced to reload, not when they manually reload (unless you altered the function to see if the currently loaded amount of bullets increased, although that was triger after the event has happened and not exactly useful).

To be fair, there's most likely a better way to do it, some sort of hook that gets called for when a player is reloading, but I have no experience or knowledge to offer on this.



[Updated on: Tue, 13 July 2010 11:03]

Report message to a moderator

Re: Is it possible to create a "I'm reloading!" alert? [message #432701 is a reply to message #432688] Tue, 13 July 2010 17:49 Go to previous messageGo to next message
TNaismith
Messages: 86
Registered: May 2006
Location: Canada
Karma: 0
Recruit
What you have offered onto the table already helps a lot. It is better to know the limitations and work-a-rounds we will be up against rather than not knowing at all.

Would what you described be tailored for a server-side addition, or would it be a script you would fiddle around with in Level Edit?

As for: "However, this would only work when the player runs out of bullets and is forced to reload, not when they manually reload (unless you altered the function to see if the currently loaded amount of bullets increased, although that was triger after the event has happened and not exactly useful)."

I'll go to the adage that 'something is better than nothing', and say that even if this trigger would only work when players actually hit the '0' number on their clip (and not when they manually reload), it would be a stepping stone nonetheless towards what is attempting to be achieved/improved.

Appreciate the reply.


http://img33.imageshack.us/img33/7928/t2010021mcsig140.gif
Re: Is it possible to create a "I'm reloading!" alert? [message #432709 is a reply to message #432688] Wed, 14 July 2010 00:11 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
You could write it eitherway...

As a plug-in, you benefit from it being able to attach to all player's characters with little effort (or infact no effort needed from the server owner).
It would also be possible to add settings in the form of an ini file to allow the server owner to change which sound was played, what was said etc etc...

As a script that you could fiddle around with in level edit, it would offer the same settings as the plug-in was capable of, but it would mean you had to manually attach it to all characters.
Plus, if you already had a modified scripts.dll that you was using containing other modified and updated code, you would need to make sure you was working with that source code, and then update the server with that same One too.

In my opinion the plug-in would be a better option, it's more maintainable, easier to implement as a server owner, and would require virtually no setting up.



Re: Is it possible to create a "I'm reloading!" alert? [message #432712 is a reply to message #432688] Wed, 14 July 2010 01:01 Go to previous messageGo to next message
TNaismith
Messages: 86
Registered: May 2006
Location: Canada
Karma: 0
Recruit
I figured there would be more work in Level Edit if it went towards being non-server side, I've seen other scripts in 3.4.4 which imply similar situations in which you have to attach scripts to each object manually in order to work. (Zunnie's 'z_console_input_killed' series of scripts come to mind here).

From what I've read about SSGM over the months I've been researching server-related things, a plug-in for an idea like this is a perfect fit.

Thanks again.


http://img33.imageshack.us/img33/7928/t2010021mcsig140.gif
Re: Is it possible to create a "I'm reloading!" alert? [message #432717 is a reply to message #432712] Wed, 14 July 2010 02:40 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
TNaismith wrote on Wed, 14 July 2010 04:01

I figured there would be more work in Level Edit if it went towards being non-server side


Just so you're aware (not that you asked, but it seems you are running on a slightly mis-informed assumption), the scripts you're talking about for level edit are infact server-side mods, despite you attaching them in level edit and using the client scripts.dll.
The script needs to be on the server, and is infact the script that's used.



Re: Is it possible to create a "I'm reloading!" alert? [message #432732 is a reply to message #432688] Wed, 14 July 2010 11:33 Go to previous messageGo to next message
TNaismith
Messages: 86
Registered: May 2006
Location: Canada
Karma: 0
Recruit
Ah yes, bad wording on my part. There is a difference between using scripts in Level Edit to achieve a result, and using plug-in scripts for SSGM to achieve the same results. That is what I was trying to distinguish.

(And reborn has already clarified what the differences would be between the two, as outlined below)

"Reborn"

As a plug-in, you benefit from it being able to attach to all player's characters with little effort (or infact no effort needed from the server owner).
It would also be possible to add settings in the form of an ini file to allow the server owner to change which sound was played, what was said etc etc...

As a script that you could fiddle around with in level edit, it would offer the same settings as the plug-in was capable of, but it would mean you had to manually attach it to all characters.
Plus, if you already had a modified scripts.dll that you was using containing other modified and updated code, you would need to make sure you was working with that source code, and then update the server with that same One too.

In my opinion the plug-in would be a better option, it's more maintainable, easier to implement as a server owner, and would require virtually no setting up.


http://img33.imageshack.us/img33/7928/t2010021mcsig140.gif
Re: Is it possible to create a "I'm reloading!" alert? [message #434793 is a reply to message #432688] Sat, 14 August 2010 19:27 Go to previous messageGo to next message
Cpo64 is currently offline  Cpo64
Messages: 1246
Registered: February 2003
Location: Powell River, B.C. Canada
Karma: 0
General (1 Star)
Oooor you could cheat and just edit the reloading sound file for each weapon.

Wait, thats not really helping is it?


-->
Re: Is it possible to create a "I'm reloading!" alert? [message #434808 is a reply to message #432688] Sun, 15 August 2010 04:58 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
If you could hook that event, it would be exactly what he was after...


Re: Is it possible to create a "I'm reloading!" alert? [message #434829 is a reply to message #432688] Sun, 15 August 2010 14:06 Go to previous messageGo to next message
R315r4z0r is currently offline  R315r4z0r
Messages: 3836
Registered: March 2005
Location: New York
Karma: 0
General (3 Stars)
To be honest, I really don't think this will change gameplay at all.

Renegade isn't the type of game where you exactly fear being hit by enemy bullets. Since you can take a bunch before you actually die, people just run out into the open and just exchange fire until someone dies. Not only that, but the magazines are extremely large AND it takes less than 3 seconds to reload.

Warning a teammate you are reloading wont do anything because it's not as if you are ducking in and out of cover and trying to prevent the enemy from advancing. Chances are your teammate really doesn't care if you're reloading or not because they are just going to attack with there all regardless if you are there or not.

A teammate wont attack the enemy just to cover you because you're reloading, they will attack the enemy because the enemy is there.

If I heard an audio sound like that from a teammate, the first thought that would cross my mind would be "Ok, you're reloading. That's great, what do you want me to do about it? I'm already shooting at the enemy."
Re: Is it possible to create a "I'm reloading!" alert? [message #434845 is a reply to message #432688] Mon, 16 August 2010 00:42 Go to previous messageGo to next message
ErroR is currently offline  ErroR
Messages: 2984
Registered: March 2008
Location: Moldova
Karma: 0
General (2 Stars)
Doesn't the ammo in the clip actually go to 0 when you start reloading?
Re: Is it possible to create a "I'm reloading!" alert? [message #434846 is a reply to message #434845] Mon, 16 August 2010 00:48 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
ErroR wrote on Mon, 16 August 2010 03:42

Doesn't the ammo in the clip actually go to 0 when you start reloading?


If it does, then you could write something really awful that polls for whether the current loader clip is equal to 0, then player the sound at their position...



Re: Is it possible to create a "I'm reloading!" alert? [message #434879 is a reply to message #432688] Mon, 16 August 2010 10:23 Go to previous messageGo to next message
TNaismith
Messages: 86
Registered: May 2006
Location: Canada
Karma: 0
Recruit
To be honest, I'll admit that R315r4z0r make a good point about how reloading in Renegade can't have the same effect that reloading in Left4dead does -- gameplay in Renegade (especially the reloading parts) just won't make much difference in this case.

Still, I like how Left4Dead made that feature in their game.


http://img33.imageshack.us/img33/7928/t2010021mcsig140.gif
Re: Is it possible to create a "I'm reloading!" alert? [message #434912 is a reply to message #434879] Tue, 17 August 2010 02:15 Go to previous messageGo to next message
Sladewill is currently offline  Sladewill
Messages: 291
Registered: January 2009
Location: United Kingdom
Karma: 0
Recruit

TNaismith wrote on Mon, 16 August 2010 18:23

To be honest, I'll admit that R315r4z0r make a good point about how reloading in Renegade can't have the same effect that reloading in Left4dead does -- gameplay in Renegade (especially the reloading parts) just won't make much difference in this case.

Still, I like how Left4Dead made that feature in their game.


Ah the left4dead reload, thats so handy Very Happy


FT-Owners - Sladewill,Snazy2007,Willdy
http://FT-Gaming.com for more info...
Re: Is it possible to create a "I'm reloading!" alert? [message #435931 is a reply to message #434846] Wed, 01 September 2010 07:06 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
reborn wrote on Mon, 16 August 2010 01:48

ErroR wrote on Mon, 16 August 2010 03:42

Doesn't the ammo in the clip actually go to 0 when you start reloading?


If it does, then you could write something really awful that polls for whether the current loader clip is equal to 0, then player the sound at their position...

Indeed it does NOT, but nothing keeps you from making a key hook for the 'R' key.


[Updated on: Wed, 01 September 2010 07:06]

Report message to a moderator

Re: Is it possible to create a "I'm reloading!" alert? [message #436046 is a reply to message #432688] Sat, 04 September 2010 02:01 Go to previous messageGo to next message
Tunaman
Messages: 1189
Registered: January 2005
Karma: 2
General (1 Star)
IIRC manual reloads aren't sent over the network, so you'd end up with the reloading sound happening when people aren't actually reloading.

http://img694.imageshack.us/img694/9055/tunamanlmao.png
Re: Is it possible to create a "I'm reloading!" alert? [message #436228 is a reply to message #432688] Tue, 07 September 2010 11:04 Go to previous message
halo2pac is currently offline  halo2pac
Messages: 659
Registered: December 2006
Location: Near Cleveland, Ohio
Karma: 0
Colonel
although when a player jumps that info is sent over the network blatantly which is kinda funny when you hook it server side.

As for the reload, ya that guy's point with Renegade being just spray play... I agree.


http://img339.imageshack.us/img339/1991/nefobbygenyunoreleasere.jpg
Rene-Buddy | Renegade X
Join the fight against Obsessive-Compulsive Posting Disorder. Cancel is ur friend.
*Renegade X Dev Team Member*
Previous Topic: DJTHED's RaceMod 2
Next Topic: RA_Allied_M04
Goto Forum:
  


Current Time: Tue May 28 23:09:32 MST 2024

Total time taken to generate the page: 0.01015 seconds