Jump to content

Reading an entity value using its key


Recommended Posts

Good evening,

I wanted to edit the DrawSpawns ETUtil function/console command to render the Axis spawns in red and Allied ones in blue

GetEntTeam doesn't work on CLASS.PLAYERSTART entity (returns null), and perhaps editing the C++ code can have side-effects (if some entity filtering is done using this command, and this kind of entity isn't supposed to be returned)

I thought about reading the classname value to do the discrimination, but can't find any existing example in the GM files

How to do so?

Thank you

 

Link to comment
Share on other sites

  • Moderators

I modified C++ code so that GetEntTeam works for spawns. It's in the mod. On Windows you need to compile qagame_mp_x86.dll from project GameInterfaces\ET\src\game\game_2013.vcxproj.

GetEntTeam is used in many map scripts, but it should not break anything because it is used only in region triggers which are triggered for CLASS.ANYPLAYER.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...