Hostage Noblock

Release your plugins here!
cssbestrpg
Senior Member
Posts: 310
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Hostage Noblock

Postby cssbestrpg » Mon Apr 05, 2021 11:21 am

Hello, this plugin allows walk through hostages.

Syntax: Select all

from events import Event
from filters.entities import EntityIter
from entities.constants import CollisionGroup

@Event('round_start')
def round_start(args):
for i in EntityIter.iterator():
if i.classname.startswith('hostage_entity'):
i.collision_group = CollisionGroup.DEBRIS_TRIGGER
User avatar
Kami
Global Moderator
Posts: 264
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Re: Hostage Noblock

Postby Kami » Mon Apr 05, 2021 11:33 am

You can simplify this a little by using an is_filter for EntityIter like this:

Syntax: Select all

from events import Event
from filters.entities import EntityIter
from entities.constants import CollisionGroup

@Event('round_start')
def round_start(args):
for i in EntityIter('hostage_entity'):
i.collision_group = CollisionGroup.DEBRIS_TRIGGER
cssbestrpg
Senior Member
Posts: 310
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: Hostage Noblock

Postby cssbestrpg » Mon Apr 05, 2021 11:38 am

Thanks for the tip. I am beginner of using EntityIter.

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 4 guests