Explosion...

Please post any questions about developing your plugin here. Please use the search function before posting!
Hedgehog
Member
Posts: 62
Joined: Sun Nov 03, 2013 8:54 pm

Explosion...

Postby Hedgehog » Tue Jul 22, 2014 1:03 pm

Is it possible to fire Explode at entity env_explosion?

I tried to use explosion from TempEntities, but it looks very different from the env_explosion one.

Syntax: Select all

from effects import TempEntities
from engines.server import EngineServer
from events import Event
from filters.recipients import RecipientFilter
from mathlib import Vector
from players.helpers import playerinfo_from_userid

@Event
def player_say(event):
userid = event.get_int('userid')
text = event.get_string('text')

if text == 'run':
info = playerinfo_from_userid(userid)
position = info.get_abs_origin()

TempEntities.explosion(RecipientFilter(), 0.0, position, -1, 0.0, 0, 8, 150, 400, Vector(), 67)


How to make TempEntities.explosion particles and the "black circle on the ground" like in env_explosion? And for some reason it doesn't make any damage to player...
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Tue Jul 22, 2014 6:06 pm

TempEntities.explosion() is not doing any damage, because the method really just creates the effect. You will have to add the damage on your own.
Hedgehog
Member
Posts: 62
Joined: Sun Nov 03, 2013 8:54 pm

Postby Hedgehog » Wed Jul 23, 2014 4:53 am

Ayuto wrote:TempEntities.explosion() is not doing any damage, because the method really just creates the effect. You will have to add the damage on your own.

Oops... I need to sleep more :D

How to create a black circle on the ground like env_explosion has?
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Wed Jul 23, 2014 12:05 pm

TempEntities.explosion() accepts a "flags" argument somewhere in its prototype accepting the following TE_EXPFLAG_* flags: https://github.com/alliedmodders/hl2sdk/blob/sdk2013/game/shared/tempentity.h

Now that we moved to python 3.4, I will wrap them at some point.


EDIT: Well, from memory, there was a flag to prints the decal or not but I just checked twice and this flag is not for this effect but for the env_explosion entity itself (as spawnflags). That or the flag is accepted as a member of a DispatchEffectInfo (or whatever I ended up calling this type on the python side). I tried to help, but from my smartphone ot's not that easy hehe. Will do some testing when I get the chance.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 164 guests