Is it possible to create a "I'm reloading!" alert? [message #432688] |
Tue, 13 July 2010 10:20 |
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?
|
|
|
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 |
|
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 |
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.
|
|
|
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 |
|
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 |
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.
|
|
|
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 |
|
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 |
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.
|
|
|
|
|
|
|
|
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 |
|
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 |
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.
|
|
|
|
|
|
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 |
|
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.
Rene-Buddy | Renegade X
Join the fight against Obsessive-Compulsive Posting Disorder. Cancel is ur friend.
*Renegade X Dev Team Member*
|
|
|