Page 1 of 1

Questions about Dynamic S.

PostPosted: 15 Apr 2018, 22:01
by thunder
Hi,

May I ask to can we use the log.txt file for logging new events? can we create our own reports for logging lines parameters?
(ofc in r6720 atm)
Thank you!
t

Re: Questions about Dynamic S.

PostPosted: 16 Apr 2018, 07:32
by Rey
You can use Actions.Log(_some text_)
Is it what you want or what do you mean?

Re: Questions about Dynamic S.

PostPosted: 16 Apr 2018, 15:08
by thunder
I guess, yes. Do you know the text can be a value of a variable?
I guess that would be amaizing or fantastic or fenomenal! :wink:
(H)

Re: Questions about Dynamic S.

PostPosted: 16 Apr 2018, 20:31
by thunder
Thank you Rey!
It gives possibilities to us to save out values and parameters from the game.
For example saving values, parameters x,y,z and convert it for a table.
I guess we looked after it long long time.
Cool.

Re: Questions about Dynamic S.

PostPosted: 01 Dec 2018, 23:50
by thunder
Hi,

I would have a very simple question. I've written a fantastic script. It is working and already in fine state, but I would be very happy if I could change/develop a little bit. To do this I would need to modifie the staring point or the starting view point under the OnMissionStart Phase to another coordinate what is already coded in the map editor.
Is that done with a static command, true? If yes, can I change that under the ONMissionStart procedure?

I'm sorry probably not used the proper words, but see which point I meant.
bvfg.jpg
Its okay if would be there a command which helps to jump the screen to the specific coordinate which is given by the script immediately after the start. Tried with those cinematics commands but KaM freezed out then.

Thank you in advanced for any advice!
t

PS: the script's just ignoring the prebuilders :mrgreen:

Re: Questions about Dynamic S.

PostPosted: 02 Dec 2018, 09:04
by Krom
Generally you would click on the house icon on that tab and put it on the map with LMB where you want it to be. Are there any additional issues?

Re: Questions about Dynamic S.

PostPosted: 02 Dec 2018, 09:17
by thunder
The real problem is I added the starting viewpoint to the map with the map editor. It is working fine and no problem with it. But that point is changing at the start of the game, because the Storehouse positioned randomly. So very frequently the Storehouse is not on the starting screen.
So what I would like to do is to change this point dynamically to the coordinate what the script gave. I would do this in the procedure OnMissionStart phase. :D
I know this is the biggest weakness of my script at this moment.

And really thanks for the help in this very dry forum times :wink:

Re: Questions about Dynamic S.

PostPosted: 02 Dec 2018, 11:00
by Krom
I don't recall KMR scripting that well myself, sorry.
Looks like you need to have the following lines in the order:

CinematicStart(playerId);
CinematicPanTo(playerId, desired_x, desired_y, 0);
CinematicEnd(playerId);

Re: Questions about Dynamic S.

PostPosted: 02 Dec 2018, 12:10
by thunder
Thank you Krom!
Barely could, but I found it out how is it working exactly. Really cool! :mrgreen:

Here it is in a working form. Still a bit raw, but I want this work for all the players in the game.
  Code:
procedure OnTick; var I: Integer; begin if States.GameTime = 2 then begin for I := 0 to (PP - 1) do if States.PlayerEnabled(I) then Actions.CinematicStart(I); end; if States.GameTime = 5 then begin for I := 0 to (PP - 1) do if States.PlayerEnabled(I) then Actions.CinematicPanTo(I,XR[I],YR[I],0); //Actions.CinematicPanTo(I,125,125,1); end; if States.GameTime = 12 then begin for I := 0 to (PP - 1) do if States.PlayerEnabled(I) then Actions.CinematicEnd(I); end; end;

Re: Questions about Dynamic S.

PostPosted: 02 Dec 2018, 12:11
by thunder
small note:
Each command has to be in different Tick, and good if those ticks are after each other :P