Search found 1084 matches

by Ayuto
Tue Aug 14, 2018 11:55 am
Forum: Plugin Development Support
Topic: Check if entity exists
Replies: 2
Views: 70

Re: Check if entity exists

To validate whether or not an instance is still valid, you would have to loop through all existing entities and compare their address [...] I would like to add that this is not a recommended approach, because the entity could have been deleted and a new entity reuses the same memory address. Like L...
by Ayuto
Tue Aug 14, 2018 11:52 am
Forum: Plugin Development Support
Topic: Entity property listener
Replies: 2
Views: 45

Re: Entity property listener

Unfortunately, there is no way to determine that without checking the attribute constantly. It might be possible to do that for networked properties, because a function (NetworkStateChanged or something like that) is getting called after the attribute has been changed.
by Ayuto
Sun Aug 12, 2018 8:30 am
Forum: General Discussion
Topic: Issues List
Replies: 5
Views: 2262

Re: Issues List

If it has been identified as a bug, it will always be marked as a bug. It depends on the state of the issue (open or closed) whether or not it has been resolved.
by Ayuto
Sun Aug 05, 2018 1:31 pm
Forum: Development Status Updates
Topic: Development status update (July 2018)
Replies: 0
Views: 44

Development status update (July 2018)

It's time for another development status update! :smile: ⋅ Fixes: ⋅ Additions: ⋅  Added CPointWorldText data. ⋅ Removals: ⋅ Changes: ⋅  Made SayText, SayText2 and TextMsg messages reliable by default. The full changelog can be found here: h...
by Ayuto
Sun Aug 05, 2018 4:48 am
Forum: Plugin Development Support
Topic: New Project: Porting Saxton Hale mod for Source.Python
Replies: 27
Views: 2497

Re: New Project: Porting Saxton Hale mod for Source.Python

You don't need a list or dictionary. The preferred way is to simply create global variables and using the config module:
http://wiki.sourcepython.com/developing ... onfig.html
by Ayuto
Sun Aug 05, 2018 4:45 am
Forum: Plugin Development Support
Topic: hooking "prethink" only runs when ducking [TF2]
Replies: 7
Views: 122

Re: hooking "prethink" only runs when ducking [TF2]

That's partially correct. If we update offsets on GitHub, you only need to restart your server to receive the latest offsets. There is a setting in the core settings to disable this behavior. Then there is also the update command "sp update", which does a full update of your SP installatio...
by Ayuto
Sun Jul 22, 2018 6:11 pm
Forum: General Discussion
Topic: Python 3.7 support?
Replies: 2
Views: 122

Re: Python 3.7 support?

No plans have been made yet. We first need to check if the update would increase the versions of the dependencies like glibc. If that is the case, I'm against an update. But that's my personal opinion.
by Ayuto
Sun Jul 22, 2018 6:08 pm
Forum: Plugin Development Support
Topic: How do I use engine_trace.enumerate_entities_in_box
Replies: 5
Views: 130

Re: How do I use engine_trace.enumerate_entities_in_box

I'm pretty sure it's a sequential task. So, the answer to your question is yes.
by Ayuto
Thu Jul 19, 2018 8:09 pm
Forum: Plugin Development Support
Topic: How do I use engine_trace.enumerate_entities_in_box
Replies: 5
Views: 130

Re: How do I use engine_trace.enumerate_entities_in_box

You need to subclass EntityEnumerator. enum_entity is getting called for every found entity.
by Ayuto
Fri Jul 13, 2018 9:24 pm
Forum: Plugin Development Support
Topic: take_damage triggers player_death twice
Replies: 2
Views: 82

Re: take_damage triggers player_death twice

IIRC, you just need to check whether the player's health is already less or equal 0. If it is, don't apply the damage.
by Ayuto
Thu Jul 05, 2018 7:47 pm
Forum: Development Status Updates
Topic: Development status update (June 2018)
Replies: 0
Views: 89

Development status update (June 2018)

It's time for another development status update! :smile: ⋅ Fixes: ⋅ Additions: ⋅  Added class info for IServerGameDLL::LevelInit. ⋅ Removals: ⋅ Changes: ⋅  Updated get_public_ip() to make a call to http://api.ipify.org instead of http://ip....
by Ayuto
Sun Jun 24, 2018 8:55 am
Forum: Plugin Development Support
Topic: reloading custom package
Replies: 5
Views: 272

Re: reloading custom package

Like quartata mentioned reloading works fine: import testlib import importlib importlib.reload(testlib) The caching is done by Python itself via a dictionary (sys.modules). If you delete the module and use the above code, you will get an error like this: [SP] Caught an Exception: Traceback (...
by Ayuto
Sat Jun 23, 2018 6:48 am
Forum: Plugin Development Support
Topic: reloading custom package
Replies: 5
Views: 272

Re: reloading custom package

Yes, it should work. Can you show us your test code?
by Ayuto
Fri Jun 22, 2018 6:00 pm
Forum: Plugin Development Support
Topic: Is it possible to control the spectate camera?
Replies: 11
Views: 318

Re: Is it possible to control the spectate camera?

I have thought about my planned changes a little bit and decided to not add them. Use this to create the event: from events.manager import game_event_manager def create_hltv_fixed_event(pos, target, fov, offset, theta, phi): event = game_event_manager.create_event('hltv_fixed', T...
by Ayuto
Fri Jun 22, 2018 6:17 am
Forum: Plugin Development Support
Topic: Is it possible to control the spectate camera?
Replies: 11
Views: 318

Re: Is it possible to control the spectate camera?

get_object_pointer() doesn't work, because the CustomEvent class doesn't implement the _ptr() method.
Also, if that method is implemented, you don't need to get the pointer on your own. SP does that under the rug.

I will make some changes today, so you can get the underlying event.
by Ayuto
Wed Jun 20, 2018 8:38 pm
Forum: Plugin Requests
Topic: [Hldms] Entity remover, to remove "doubles"
Replies: 5
Views: 254

Re: [Hldms] Entity remover, to remove "doubles"

I guess the hl2dm build will also work for hldms. Just in case anyone needs it or wants to elaborate it a little bit more, here is "Stripper Lite". :grin: # ============================================================================= # >> IMPORTS # ========================================...
by Ayuto
Thu Jun 14, 2018 6:10 am
Forum: Plugin Requests
Topic: [Hldms] Entity remover, to remove "doubles"
Replies: 5
Views: 254

Re: [Hldms] Entity remover, to remove "doubles"

No need to use the emulator. EventScripts and Source.Python can be run at the same time on Windows.
by Ayuto
Sun Jun 03, 2018 11:09 am
Forum: Development Status Updates
Topic: Development status update (May 2018)
Replies: 0
Views: 116

Development status update (May 2018)

It's time for another development status update! :smile: ⋅ Fixes: ⋅  Fixed issue #248. ⋅ Additions: ⋅  Added magic methods to _CvarManager to return the ConVar value as the right type. ⋅  Added "reliable" attribute to RecipientFilter. &sdot...
by Ayuto
Tue May 29, 2018 4:14 pm
Forum: Plugin Development Support
Topic: parent entity behaviour effects changed
Replies: 10
Views: 357

Re: parent entity behaviour effects changed

Thanks for verifying! I have changed it back to the KeyValue method:
https://github.com/Source-Python-Dev-Te ... 7a0b5c549d
by Ayuto
Tue May 29, 2018 3:48 pm
Forum: Plugin Development Support
Topic: parent entity behaviour effects changed
Replies: 10
Views: 357

Re: parent entity behaviour effects changed

Did entity.get_key_value_vector('origin') fix your issue?

Go to advanced search