Map Database  •  FAQ  •  RSS  •  Login

Questions about Dynamic S.

<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 15 Apr 2018, 22:01

Questions about Dynamic S.

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
<<

Rey

User avatar

KaM Remake Developer

Posts: 217

Joined: 12 Oct 2016, 07:41

KaM Skill Level: Fair

Location: Moscow

Post 16 Apr 2018, 07:32

Re: Questions about Dynamic S.

You can use Actions.Log(_some text_)
Is it what you want or what do you mean?
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 16 Apr 2018, 15:08

Re: Questions about Dynamic S.

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)
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 16 Apr 2018, 20:31

Re: Questions about Dynamic S.

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.
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 01 Dec 2018, 23:50

Re: Questions about Dynamic S.

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:
You do not have the required permissions to view the files attached to this post.
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 02 Dec 2018, 09:04

Re: Questions about Dynamic S.

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?
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 02 Dec 2018, 09:17

Re: Questions about Dynamic S.

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:
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 02 Dec 2018, 11:00

Re: Questions about Dynamic S.

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);
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 02 Dec 2018, 12:10

Re: Questions about Dynamic S.

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;
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 02 Dec 2018, 12:11

Re: Questions about Dynamic S.

small note:
Each command has to be in different Tick, and good if those ticks are after each other :P

Return to “Dynamic Scripting”

Who is online

Users browsing this forum: No registered users and 11 guests