Page MenuHomeFeedback Tracker

Custom Input not synchronized to server?
Reviewed, NormalPublic

Description

Trying make control of horse speed using mouse wheel. So registering new Input:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<modded_inputs>
    <inputs>
        <actions>
            <input name="UADayzHorseSpeedUp" loc="Speed Up" />
			<input name="UADayzHorseSpeedDown" loc="Speed Down" />
        </actions>
        <sorting name="DayZ_Horse" loc="DayZ Horse">
            <input name="UADayzHorseSpeedUp" />
            <input name="UADayzHorseSpeedDown" />
        </sorting>
    </inputs>
    <preset>
        <input name="UADayzHorseSpeedUp">
            <btn name="mWheelUp" />
        </input>
		<input name="UADayzHorseSpeedDown">
            <btn name="mWheelDown" />
        </input>
    </preset>
</modded_inputs>

But when in commandhandler of horse trying get mousewheel movement up, its not recognized, but for example vanilla inputs are. Tried also opticzoomin, but also not catched on server.

My code snippet of horse commandhadler:

hic = player.GetInputController();
			//rotace kone
			//inputController.OverrideHeading(true, inputController.GetHeading()+(hic.GetAimChange()[0]));
			
			//mWheelUp
			//mWheelDown
			
			Print ("mouse wheel up " + input.SyncedValue_ID(UADayzHorseSpeedUp)); <------------- still show zero
			
			float movementX = input.SyncedValue_ID(UAMoveRight) - input.SyncedValue_ID(UAMoveLeft);   <--------------- works
			float maxTurnSpeed = 100.0;

Details

Severity
Block
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
General
Steps To Reproduce

register mousewheel using moddet inputs

try catch mousewheel on server side

Event Timeline

Hunterz created this task.Tue, Oct 29, 12:24 PM
Geez changed the task status from New to Assigned.Tue, Oct 29, 12:39 PM
Geez changed the task status from Assigned to Reviewed.Wed, Oct 30, 10:05 AM
Geez added a subscriber: Geez.

The values are only synchronized when the client also calls any function inside InputInterface on the same player simulation timestamp (Entity.GetSimulationTimestamp) as the server. Additionally, any calls to InputInterface must only be done inside only the players command handler.

The information you have provided suggests you are not doing that.
Regards,
Geez

inkihh added a subscriber: inkihh.Wed, Oct 30, 11:36 AM

I am doing it same way like is introduced in vanilla with cinematic control of animals. Thts why I am curious why some types of inputs works out of the box and some not.