L39Tom Posted March 23, 2019 Share Posted March 23, 2019 Hi there, after latest update something should corrected with the events, especially with the hit event. So I made some testing with that script: local Event_Handler = {} function Event_Handler:onEvent(event) if event.id == world.event.S_EVENT_HIT and event.initiator then env.info("********hit event***********") if event.target:getPlayerName() then targetPlayer = event.target:getPlayerName() else targetPlayer = " NO targetPlayer" end if event.target:getName() then target = event.target:getName() else target = " NO target" end if event.weapon:getTypeName() then weapon = event.weapon:getTypeName() else weapon = " NO weapon" end if event.initiator:getName() then shooter = event.initiator:getName() else shooter = " NO shooter" end if event.initiator:getPlayerName() then shooterPlayer = event.initiator:getPlayerName() else shooterPlayer = " NO shooterPlayer" end -- Shooter trigger.action.outText(" shooterPlayer = ".. shooterPlayer, 30) trigger.action.outText(" shooter = ".. shooter, 30) -- Weapon trigger.action.outText(" weapon = ".. weapon, 30) -- Target trigger.action.outText(" targetPlayer = ".. targetPlayer, 30) trigger.action.outText(" target = ".. target, 30) trigger.action.outText(" ______________________________", 30) end end world.addEventHandler(Event_Handler) AI vs AI ....works fine Player vs AI ....works fine Client vs Client ....seems still broken if Client (that runs the server) get hit ..... nothing happend if Client (that joints the server) get hit .... works fine So it seems the hit event on the server host ist still not working! Help me, if something of my script is wrong. Thanks Link to comment Share on other sites More sharing options...
L39Tom Posted March 23, 2019 Author Share Posted March 23, 2019 Here the mission Hit event tester.miz Link to comment Share on other sites More sharing options...
Recommended Posts