Entity.call_input("Break") function not working?

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
D3CEPTION
Senior Member
Posts: 129
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

Entity.call_input("Break") function not working?

Postby D3CEPTION » Thu Feb 18, 2016 6:15 pm

hello guys,

im testing this in csgo.
i have tested, all day and it seems, that since the update Entity.call_input("Break") doesnt work anymore.


my guesses are that either datamaps have changed ( for entities, who can produce gibs ) or sp simply have to update.
or is this issue related to some other internal change, that broke the entire function?

can anybody confirm that it isnt working, so we can figure out why?


Thanks! :)
User avatar
satoon101
Project Leader
Posts: 2698
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Fri Feb 19, 2016 4:04 am

It would help to have some context or code that you are using to know which entity you are attempting to use this on. CBreakable, CBreakableProp, and CRopeKeyframe all have a "Break" input on CS:GO. Each is used by specific entity types:


  • CBreakable
    • func_breakable
    • func_breakable_surf
    • func_physbox
    • func_physbox_multiplayer
    • func_pushable
  • CBreakableProp
    • chicken
    • dynamic_prop
    • item_coop_coin
    • physics_prop
    • physics_prop_statue
    • prop_door_rotating
    • prop_dynamic
    • prop_dynamic_glow
    • prop_dynamic_ornament
    • prop_dynamic_override
    • prop_exploding_barrel
    • prop_physics
    • prop_physics_multiplayer
    • prop_physics_override
    • prop_physics_respawnable
    • prop_sphere
  • CRopeKeyframe
    • keyframe_rope
    • move_rope
Image
User avatar
D3CEPTION
Senior Member
Posts: 129
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

Postby D3CEPTION » Fri Feb 19, 2016 8:30 am

i tested this on "prop_dynamic_override" and "prop_physics_multiplayer", which both definately worked before.

here is some simple code:

Syntax: Select all

entity = Entity.create('prop_dynamic_override')
entity.set_key_value_string('model', MODEL)
entity.set_key_value_int('solid', 6)
entity.call_input('AddHealth', 10)
entity.origin = player.eye_location + player.view_vector * 150
entity.spawn()
entity.call_input("Break")


the break function seems to have changed from :
1) breakanimation
2) prop destroy
3) spawn gibs

to :
1) breakanimation
2) prop destroy
3) -- None --

but maybe there is a mistake on my part? my test results show, that
1 ) shooting the target creates the desired result , but
2) all dmg applying methodes ( entity.take_damage, "break", "remove health" etc) - never spawn any gibs, instead just vanish the initial prop.
User avatar
D3CEPTION
Senior Member
Posts: 129
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

Postby D3CEPTION » Fri Feb 19, 2016 6:49 pm

Okay, i solved this issue. i used my code within Event('weapon_fire').

my guess is that weapon_fire somehow lasts less than the required tick size of the Break() function, so that the break function gets canceled before it can finish.
if i use my code within Event('player_say') everything works fine.

very odd situation. for me it works now, so i found a solution to my problem, although im hoping for some dev to give further clarification on why excatly this is.

thanks
User avatar
D3CEPTION
Senior Member
Posts: 129
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

Postby D3CEPTION » Fri Feb 19, 2016 9:50 pm

Further testing has shown, that the break() function itself works. but in some situations it doesnt spawn gibs.
my testings were done in Event weapon_fire, where it doesnt work at all.
only a dev could give details why. its probably due to tick synchronisation in events wrapper

edit:
preaching the gib beforehand seems to help.
maybe automatic precaching is not guaranteed to finish within the inherited tick?
additionally, maybe weapon_fire's tick is always < required tick of break()?
( not sure if break() is bound to a tick size though )

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 12 guests