func_arena Monday, September 21, 2026
Building, modding and fragging like it's 1998

142778 visitors
YOUR #1 SOURCE FOR RETRO FPS DEVELOPMENT Y2K READY
  *** func_arena goes live, let the carnage begin!   ***   ET: Legacy 2.86.0 is out!   ***   Engine of the Week: qrustyquake by cyanbun96   ***   Server admins: read our migration guide before Friday   ***   Ironwail 0.8.2 is out!   ***  
NAVIGATION
Wiki » Reference » DOOM 3 Script Events » getNextKey
ARTICLE

getNextKey

This is a script event on id Tech 4 engines, present on DOOM 3, Quake 4 and Prey. Below you can find its signature for each game that declares it.

DOOM 3

searches for the name of a spawn arg that matches the prefix. for example, passing in "attack_target" matches "attack_target1", "attack_targetx", "attack_target_enemy", etc. The returned string is the name of the key which can then be passed into functions like getKey() to lookup the value of that spawn arg. This is usefull for when you have multiple values to look up, like when you target multiple objects. To find the next matching key, pass in the previous result and the next key returned will be the first one that matches after the previous result. pass in "" to get the first match. returns "" when no more keys match. Note to coders: this is the same as MatchPrefix in the game code.

Property Value
Type script event
Returns string
Parameters string prefix, string lastMatch
Section all entities

Quake 4

Property Value
Type script event
Returns string
Parameters string, string

Prey

Property Value
Type script event
Returns string
Parameters string, string

Last changed Sep 21, 2026
<< back to the wiki  ·  History
RELATED GAMES
DOOM 3
Quake 4
Prey
HOT FILES
No files yet.
all files >>
LATEST BLOGS
No blog posts yet.
all blogs >>
MEDIA FROM THE BLOGS
No blog post has a picture yet.
all blogs >>
LATEST DEVLOGS
No devlog entries yet.
all blogs >>
CHAT
IRC:
#func_arena @ irc.libera.chat

Discord:
Map-Center

41 fraggers right now. Be nice to others.
Powered by Debian Linux Now! Get Mozilla Now! Stop Microsoft! Dopefish Now! 1-Bit Icons by Nikoichu
home  ·  contact  ·  privacy policy  ·  forums  ·  submit content  ·  rss
func_arena is a member of the func_network. We are not responsible for user content, your ping, or your kill-to-death ratio.
Powered by fragnuke 0.7.2. Best viewed at 1024x768 in Mozilla. No frames, no Flash, no bs.