View Single Post
psychonic

BAFFLED
Join Date: May 2008
Old 11-29-2010 , 07:37   Re: [Alien Swarm] Finding current equipped weapon name
Reply With Quote #7

Quote:
Originally Posted by comp_noob View Post
so there isn't any way to actually get the currently equipped weapon on the marine? i've seen from some other pages that there is a GetMarine() to get the actual controlled marine by the player, because the player isn't moving at all.. as taken from here:
From the Valve Wiki:
"Unlike most Source engine games, the player in Alien Swarm is an invisible
commander entity. It does not move. If the player is currently controlling a
marine, then calling the GetMarine() method on the player will return it."
But then, is there a full list of the new scripting api reference of alien swarm available? there seems to be some commands that are new...
With a small amount of looking, the only way I found in SP to link between commander/players/clients and marines is to find each of the marine resource ents, either with FindEntityByClassname or watching for them with SDK Hooks' OnEntityCreated forward and then look at the m_Command and m_MarineEntity on each as noted in my response to one of your posts on the SDK Hooks thread, https://forums.alliedmods.net/showpo...&postcount=989
Quote:
Originally Posted by comp_noob View Post
by the way, is there any way to check the available api reference from the sourcemod? like check what scripting api is available for alien swarm in the sourcemod files?
In general, anything not in a game-specific extension should work with the exception that some things in SDK Tools will not. (or at least not without tinkering as some functions you will want to use on the marine and not the player).

Alien Swarm has the extra exception that no current menu implementation works. A while ago, I was messing with the possibility of implementation menus using hud messages, resulting in menus displaying similarly to AMXX's as this would have given an on-screen menu to game's that didn't support the radio menu (HL2DM and now Alien Swarm where where vgui menu is also busted). At one point, it was partially working, but there were a couple bugs. I later accidentally even broke what I had and never got back to finishing it. If there's enough interest, I might look at it again.

Last edited by psychonic; 11-29-2010 at 07:40.
psychonic is offline