Create an account


Poll: Event keys - Good idea?
You do not have permission to vote in this poll.
Yes
60.00%
3 60.00%
No
20.00%
1 20.00%
I'm too cool to vote
20.00%
1 20.00%
Total 5 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SUGGESTION] Event keys

#1
A great feature to have in Xonotic would be event binds, ie when an event happens a command is triggered without having to dirty your hands in QC.

A really easy (from the user's perspective, anyway) method of implementing this would be to have events as keys, so you could use the current bind <key> <command> syntax like bind <event> <command>. You could have some of the Quake C entry points as events and some others too, which could include:
e_on_vehicle_enter, e_on_vehicle_exit, e_on_deathtype_riddled, e_on_game_exit, e_on_server_connect, e_on_server_disconnect, etc., etc..

Is this a realistic idea? Is it even worth it? Is it already implemented/planned?
[Image: vN3NkMA]
(Idea stolen from Mr. Bougo. Hehehehe)
Reply

#2
Its realistic but there are a lot of events to create.
Reply

#3
Some events already have this. Do "apropos _hook_gamestart".
(07-18-2010, 10:59 AM)Flying Steel Wrote: How could anyone with ADHD tell its a high damage weapon if it wasn't a gigantic metal cock fucking the map whenever a player gets within 3 meters of a wall?

[Image: di-712770583645.png]
Reply

#4
To use those gamestart hooks, alias cl_hook_gamestart_foo to whatever command you want it to execute, where foo is one of the possibilities listed in the apropos list.
sv_hook are serverside hooks.

When I implemented that, I thought of what event I could use to trigger aliases, and gamestart/end seemed to be the only necessary ones...
Reply

#5
With the gametype-specific hooks, one can run a specific set of binds for different gamemodes (so you don't say "I have the flag!" during a DM match.)
(07-18-2010, 10:59 AM)Flying Steel Wrote: How could anyone with ADHD tell its a high damage weapon if it wasn't a gigantic metal cock fucking the map whenever a player gets within 3 meters of a wall?

[Image: di-712770583645.png]
Reply

#6
Hmm, that's roughly what I need.

I s'pose that if I need more I'll add them as I'm going Smile
[Image: vN3NkMA]
(Idea stolen from Mr. Bougo. Hehehehe)
Reply

#7
Add them? How? Tongue

Anyway, I thought the other events (for example flag capture or even worse, fragging) would lead to annoying auto-spam... So I left those out.
Reply

#8
I'll have to see how it's the current aliases are called in Xonotic, but if I really want them I'll have to add them myself in a similar way.

I definitely see what you mean about spamming:
GOOD SHOT!
NICE CAP!
I JUST DIED!
JOINING THE RED TEAM!
I THINK I MIGHT HAVE ENTERED THE RAPTOR!

Update: I found where it is currently, it's simply called on Gamemode_Init() and CSQC_Shutdown().
[Image: vN3NkMA]
(Idea stolen from Mr. Bougo. Hehehehe)
Reply

#9
Yep, though you can't add your own... CSQC modding is impossible due to hash checks, to prevent cheating.
Besides, hooks for different events would likely have to be placed somewhere else, and in a different way.

If you have good ideas for hooks, feel free to suggest them or better, implement them and submit a patch, before xonotic is released.
Reply

#10
Mr. Bougo Wrote:If you have good ideas for hooks, feel free to suggest them or better, implement them and submit a patch, before xonotic is released.

Sounds like an easier way to do this Big Grin
[Image: vN3NkMA]
(Idea stolen from Mr. Bougo. Hehehehe)
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [SUGGESTION] Tool to manage player ID keys Mr. Bougo 27 32,000 02-16-2014, 04:29 AM
Last Post: Cyber Killer
  [SUGGESTION] Idea: xonotic event calendar Antibody 19 18,048 08-13-2010, 08:34 PM
Last Post: Antibody

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-