I try to spin an object around Y axis.
I did not figure out how to spin an entity after spawning using SourcePython commands, so my approach was to activate a spinning animation of a model. My thought was to use entity.call_input().
Syntax: Select all
from engines.precache import Model
from entities._base import Entity
from events import Event
from players._base import Player
from entities.constants import SolidType
@Event('player_say')
def player_say(game_event):
skin = Entity.create('prop_dynamic_override')
player = Player(game_event.index)
skin.model = Model('models/coop/challenge_coin.mdl')
skin.origin = player.origin
skin.set_property_ushort('m_Collision.m_usSolidFlags', 12) # 8 - not solid, 4 - trigger
skin.solid_type = SolidType.BBOX
skin.spawn()
skin.call_input('SetDefaultAnimation', "challenge_coin_idle")
It spawns and it does not spin. I tried to place skin.call_input() before spawn, same result.
Any thoughts where is an error or other approaches?