Lua hooks help [message #449077] |
Fri, 24 June 2011 12:13 |
hego64
Messages: 19 Registered: April 2011 Location: Hegoville
Karma: 0
|
Recruit |
|
|
Is it possible to have something like a die hook? What I want is for a bunch of players to be in spectate mode. When a player not in spectate mode dies, he/she turns into a spectator and someone else in spectate mode dies and spawns to take their place. I'm not sure how to do this, or if it is even possible. Any help would be appreciated
Thanks,
Hego64
|
|
|
Re: Lua hooks help [message #449078 is a reply to message #449077] |
Fri, 24 June 2011 13:00 |
iRANian
Messages: 4308 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
I'm not familiar with the LUA plugin but if you do it via C++ you can create and attach a script and in the ::Killed() event do that kind of stuff. Does the LUA plugin allow you to create scripts?
Oh and in the A Path Beyond Gamma mod (which includes a build of scripts 4.0) there's an issue with using the normal spectate code, if you put someone in spectate in that mod, players will see the name tag of the player in spectate floating around where the player is located. So when scripts 4.0/TT patch gets released in the future, Renegade players will probably also be able to see the name tag of the guy in spectate.
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
[Updated on: Fri, 24 June 2011 13:03] Report message to a moderator
|
|
|
Re: Lua hooks help [message #449087 is a reply to message #449078] |
Sat, 25 June 2011 02:52 |
|
sla.ro(master)
Messages: 610 Registered: September 2010 Location: Romania
Karma: 0
|
Colonel |
|
|
iRANian wrote on Fri, 24 June 2011 23:00 | I'm not familiar with the LUA plugin but if you do it via C++ you can create and attach a script and in the ::Killed() event do that kind of stuff. Does the LUA plugin allow you to create scripts?
Oh and in the A Path Beyond Gamma mod (which includes a build of scripts 4.0) there's an issue with using the normal spectate code, if you put someone in spectate in that mod, players will see the name tag of the player in spectate floating around where the player is located. So when scripts 4.0/TT patch gets released in the future, Renegade players will probably also be able to see the name tag of the guy in spectate.
|
Lua 4/5 supports Scripts, you can attach a script to all Players and use killed hook call from the script, is easy and yes you can see spectate on 4.0, i tested it on mutant co-op and i saw one of mods flying around me, lol
Creator of Mutant Co-Op
Developer of LuaTT
|
|
|
|
|