Effects Box

Please post any questions about developing your plugin here. Please use the search function before posting!
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Effects Box

Postby decompile » Sun Jul 03, 2016 9:55 am

Hey,

I was always using the normal way to draw boxes with effects.box,
but now im getting some weird errors which says "Only 3 keywords are avaible, 18 were given"
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Effects Box

Postby Ayuto » Sun Jul 03, 2016 10:21 am

Might want to provide the full traceback and code to reproduce the issue? Note that the effects package has been updated (see also: Development status update (June 2016). It now requires you to specify the keywords of the temporary entity "BeamPoints".
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Effects Box

Postby decompile » Sun Jul 03, 2016 10:41 am

Code: Select all

    box(RecipientFilter(), 10, self.coord1, self.coord2, beam_model.index, beam_model.index, 0, 255, 5, 1, 1, 3, 0, r, g, b, 255, 1)

TypeError: box() takes 3 positional arguments but 18 were given

User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Effects Box

Postby Ayuto » Sun Jul 03, 2016 10:51 am

Well, that's not the full traceback, but like I said you need to specify the keywords for the temporary entity BeamPoints.

Example:

Syntax: Select all

from effects import box
from filters.recipients import RecipientFilter
from engines.precache import Model
from events import Event
from players.entity import Player

model = Model('sprites/laser.vmt')

@Event('player_say')
def player_say(event):
player = Player.from_userid(event['userid'])
box(
RecipientFilter(),
player.origin,
player.view_coordinates,
alpha=255,
blue=0,
green=0,
red=255,
amplitude=0,
end_width=1,
life_time=7,
start_width=1,
fade_length=0,
flags=0,
frame_rate=255,
halo=model,
model=model,
start_frame=0
)

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 46 guests