Page 1 of 1
Alpha build posted (for real this time)..
Posted: Sat Aug 18, 2012 7:17 pm
by your-name-here
I've posted an alpha build of Source.Python containing our latest changes.
What's changed:
- We've exposed the IEffects interface (which is in the Misc).
- We've exposed the Vector class along with assorted methods.
- Added the ServerVar library.
- Added the Player and Entities generators.
You can grab the build from here:
http://source-python.googlecode.com/files/source-python-1.0.0a.zip
Posted: Sat Aug 18, 2012 7:57 pm
by DreTaX14
So this is for all the linux users.
plugin_print works.
Server doesn't crash.
Addons are working(Hopefully)
Posted: Sun Aug 19, 2012 1:56 am
by BackRaw
your-name-here wrote:I've posted an alpha build of Source.Python containing our latest changes.
What's changed:
- We've exposed the IEffects interface (which is in the Misc).
- We've exposed the Vector class along with assorted methods.
- Added the ServerVar library.
- Added the Player and Entities generators.
You can grab the build from here:
http://source-python.googlecode.com/files/source-python-1.0.0a.zip
Awesome news! What do you mean by Player and Entities
generators? Example?

Posted: Sun Aug 19, 2012 2:21 am
by satoon101
Syntax: Select all
from Source import Player
from Source import Entity
from Source import Engine
for player in Player.Players():
print(player.GetName())
print(player.GetNetworkIDString())
for entity in Entity.Entities('weapon_'):
print(entity.GetClassName())
print(Engine.IndexOfEdict(entity))
Until the wiki is updated, info on Player objects:
http://code.google.com/p/source-python/source/browse/src/core/modules/export_player.cppInfo on Entity objects:
http://code.google.com/p/source-python/source/browse/src/core/modules/export_entity.cppSatoon
Posted: Sun Aug 19, 2012 2:42 am
by BackRaw
Yeah, thanks, I knew about them. But I was confused about the word
generators^^
Posted: Sun Aug 19, 2012 2:49 am
by satoon101
Posted: Sun Aug 19, 2012 5:14 pm
by BackRaw
You don't get what I'm talking about... your-name-here says there are Player and Entity decorators but you don't decorate a script using the word Player or Entity, do you?
Posted: Sun Aug 19, 2012 5:18 pm
by satoon101
Where did he say "decorator"? And no, I honestly have no idea what you are talking about. Each uses a "generator" that iterates over the players/entities instead of returning a list.
Satoon
Posted: Sun Aug 19, 2012 6:00 pm
by BackRaw
satoon101 wrote:Where did he say "decorator"? And no, I honestly have no idea what you are talking about. Each uses a "generator" that iterates over the players/entities instead of returning a list.
Satoon
OMG sorry it's my fault... He said generators, not decorators... sorry about that
