Spawn location of particle effect
Posted: Mon May 14, 2018 8:21 pm
Hello! I'm trying to spawn particle "weapon_tracers_taser". It works good except one thing: It spawn from location I set (player.view_coordinates) to zero point of a map ( Vector(0, 0, 0)). I tried to set a lot of particle params like particle.start_point and end_point but nothing happened. Please help me to figure out what's wrong. Here's my code:
May be helpful, dir(particle) output :
Syntax: Select all
from commands.say import SayCommand
from engines.server import engine_server
from stringtables import string_tables
from players.entity import Player
from entities.entity import Entity
@SayCommand('spawn')
def spawn_effect(command, index, team_only=None):
player = Player(index)
particle = Entity.create('info_particle_system')
particle.effect_name = 'weapon_tracers_taser'
engine_server.precache_generic('weapon_tracers_taser', True)
particle.origin = player.view_coordinates
particle.effect_index = string_tables.ParticleEffectNames.add_string('weapon_tracers_taser')
particle.call_input('Start')
May be helpful, dir(particle) output :
Code: Select all
__class__
__delattr__
__dict__
__dir__
__doc__
__eq__
__format__
__ge__
__getattr__
__getattribute__
__gt__
__hash__
__init__
__init_subclass__
__le__
__lt__
__module__
__ne__
__new__
__reduce__
__reduce_ex__
__repr__
__setattr__
__sizeof__
__str__
__subclasshook__
__weakref__
_get_property
_index
_obj
_ptr
_set_parent
_set_property
_size
active
add_context
add_output
address
angles
auto_dealloc
avelocity
base_entity
base_velocity
basehandle
call_input
class_name
classname
clear_context
clear_parent
collideable
collision_group
color
compare
copy
cpoint1
cpoint10
cpoint11
cpoint12
cpoint13
cpoint14
cpoint15
cpoint16
cpoint17
cpoint18
cpoint19
cpoint1_parent
cpoint2
cpoint20
cpoint21
cpoint22
cpoint23
cpoint24
cpoint25
cpoint26
cpoint27
cpoint28
cpoint29
cpoint2_parent
cpoint3
cpoint30
cpoint31
cpoint32
cpoint33
cpoint34
cpoint35
cpoint36
cpoint37
cpoint38
cpoint39
cpoint3_parent
cpoint4
cpoint40
cpoint41
cpoint42
cpoint43
cpoint44
cpoint45
cpoint46
cpoint47
cpoint48
cpoint49
cpoint4_parent
cpoint5
cpoint50
cpoint51
cpoint52
cpoint53
cpoint54
cpoint55
cpoint56
cpoint57
cpoint58
cpoint59
cpoint5_parent
cpoint6
cpoint60
cpoint61
cpoint62
cpoint63
cpoint6_parent
cpoint7
cpoint7_parent
cpoint8
cpoint9
create
damage_filter
datamap
dealloc
delay
destroy_immediately
direction
disable_damage_forces
disable_shadow
dispatch_response
edict
effect_index
effect_name
effects
elasticity
emit_sound
enable_damage_forces
enable_shadow
end_point
end_touch
factory
find
find_or_create
fire_user1
fire_user2
fire_user3
fire_user4
friction
functiontables
get_bool
get_char
get_datamap_property_bool
get_datamap_property_char
get_datamap_property_color
get_datamap_property_double
get_datamap_property_float
get_datamap_property_int
get_datamap_property_interval
get_datamap_property_long
get_datamap_property_long_long
get_datamap_property_pointer
get_datamap_property_quaternion
get_datamap_property_short
get_datamap_property_string_array
get_datamap_property_string_pointer
get_datamap_property_uchar
get_datamap_property_uint
get_datamap_property_ulong
get_datamap_property_ulong_long
get_datamap_property_ushort
get_datamap_property_vector
get_double
get_eye_location
get_float
get_input
get_int
get_key_value_bool
get_key_value_color
get_key_value_float
get_key_value_int
get_key_value_qangle
get_key_value_string
get_key_value_vector
get_long
get_long_long
get_model
get_network_property_bool
get_network_property_char
get_network_property_color
get_network_property_double
get_network_property_float
get_network_property_int
get_network_property_interval
get_network_property_long
get_network_property_long_long
get_network_property_pointer
get_network_property_quaternion
get_network_property_short
get_network_property_string_array
get_network_property_string_pointer
get_network_property_uchar
get_network_property_uint
get_network_property_ulong
get_network_property_ulong_long
get_network_property_ushort
get_network_property_vector
get_parent
get_pointer
get_property_bool
get_property_char
get_property_color
get_property_edict
get_property_float
get_property_int
get_property_interval
get_property_pointer
get_property_quaternion
get_property_short
get_property_string
get_property_string_pointer
get_property_uchar
get_property_uint
get_property_ushort
get_property_vector
get_short
get_string_array
get_string_pointer
get_uchar
get_uint
get_ulong
get_ulong_long
get_ushort
get_virtual_func
global_name
gravity
ground_entity
hammerid
health
index
inputs
inthandle
is_in_solid
is_networked
is_overlapping
is_player
keyvalues
kill_hierarchy
local_time
lookup_attachment
lookup_bone
ltime
make_function
make_virtual_function
max_health
maxs
mins
model
model_handle
model_header
model_index
model_name
move
move_type
networkable
on_dealloc
on_take_damage
origin
outputs
owner
owner_handle
parent
parent_inthandle
parent_name
physics_object
pointer
properties
protect
realloc
remove
remove_context
render
render_amt
render_color
render_fx
render_mode
render_mode_prop
rotation
search_bytes
server_class
server_classes
set_bool
set_char
set_damage_filter
set_datamap_property_bool
set_datamap_property_char
set_datamap_property_color
set_datamap_property_double
set_datamap_property_float
set_datamap_property_int
set_datamap_property_interval
set_datamap_property_long
set_datamap_property_long_long
set_datamap_property_pointer
set_datamap_property_quaternion
set_datamap_property_short
set_datamap_property_string_array
set_datamap_property_string_pointer
set_datamap_property_uchar
set_datamap_property_uint
set_datamap_property_ulong
set_datamap_property_ulong_long
set_datamap_property_ushort
set_datamap_property_vector
set_double
set_float
set_int
set_key_value_bool
set_key_value_color
set_key_value_float
set_key_value_int
set_key_value_qangle
set_key_value_string
set_key_value_vector
set_long
set_long_long
set_model
set_network_property_bool
set_network_property_char
set_network_property_color
set_network_property_double
set_network_property_float
set_network_property_int
set_network_property_interval
set_network_property_long
set_network_property_long_long
set_network_property_pointer
set_network_property_quaternion
set_network_property_short
set_network_property_string_array
set_network_property_string_pointer
set_network_property_uchar
set_network_property_uint
set_network_property_ulong
set_network_property_ulong_long
set_network_property_ushort
set_network_property_vector
set_parent
set_parent_attachment
set_parent_attachment_maintain_offset
set_pointer
set_property_bool
set_property_char
set_property_color
set_property_edict
set_property_float
set_property_int
set_property_interval
set_property_pointer
set_property_quaternion
set_property_short
set_property_string
set_property_string_pointer
set_property_uchar
set_property_uint
set_property_ushort
set_property_vector
set_protection
set_short
set_string_array
set_string_pointer
set_transmit
set_uchar
set_uint
set_ulong
set_ulong_long
set_ushort
shadow_cast_dist
shadow_cast_distance
size
solid_flags
solid_type
spawn
spawn_flags
speed
start
start_active
start_point
start_time
start_touch
stop
stop_play_end_cap
stop_sound
take_damage
target
target_name
team_index
teleport
touch
type_info
unprotect
use
velocity
view_offset
view_ofs
water_level