View Single Post
Author Message
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 06-21-2009 , 23:50   Zombie Panic Source notes
Reply With Quote #1

For lack of a better place to put this, I'm sticking these here so people don't duplicate what I've already attempted to do with the game:
  • You cannot set people to be carriers by changing CPlayerResource.m_bIsCarrier. If you do this every frame, they will appear on the scoreboard as infected, but not actually infect people. I assume the game is storing the "real" infected person elsewhere, though I was unable to locate where. It's also possible that it gives you a new weapon (I just looked at the weapon list for this mod, and it seems very likely)
  • You cannot make people infected just by changing CHL2_Player.m_IsInfected. This will only change the person over when they die. To do this properly, you need to set this, wait awhile, send SurvivorInfected (makes the little dots appear). Wait awhile longer, change the players team, strip all their weapons, and give them the "arms" weapon

That is all, hope I save someone some experimenting.
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline