Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   [Tutorial] Simple Scripting Lessons - Preparations (http://forum.fulqrumpublishing.com/showthread.php?t=28997)

moggel 04-01-2012 08:43 PM

I'm experienced with VS and C# and got exited to realize scripting is done in my "native language". Are there any dokumentation for the libraries that I can explore?

Thanks

FG28_Kodiak 04-01-2012 10:01 PM

No, not at the moment.

moggel 04-02-2012 08:09 AM

Too bad. Is there any word from Oleg et. al. when their API will be officially "released" (documented)?

Until the, I very much look forward to your upcoming tutorials! :-)

Cheers

FG28_Kodiak 04-02-2012 08:45 AM

At the moment the API seems unfinished like the other parts of the game. So may be in the Future :rolleyes:

moggel 04-03-2012 09:46 PM

Just a quick question Kodiak: Is it possible to debug using VS2010? That is, can I attach to a CLOD process (if so, which one) and set breakpoints in the code in order to examine what happens when?

FG28_Kodiak 04-04-2012 04:22 AM

No, its not possible.

moggel 04-04-2012 09:29 AM

Ok, I suspected as much. I suppose one is down to "poor man's debugging" using a textual log or something then to figure it all out...

moggel 04-08-2012 10:40 AM

Console Window
 
Me again... :grin:

I'm into scripting now and things are slowly starting to fall into place. I've experimented with triggers, got some planes to drop a wing and so on, all in the good name of exploration. :-P

However, I really do miss the ability to write some output into a console window. I've seen several scripts that write to the normal System.Console and since it's possible to configure an "Info Window" to write "Console Output" I thought I had found the way to do it. However, the only stuff that goes into such an Info Window is the stuff written by the game engine it seems. I never see any of my own stuff ending up in there.

Is there some neat trick I need to know about in order to make use of System.Console? Why else do script authors bother to write to the System.Console?

FG28_Kodiak 04-08-2012 10:54 AM

you can write things into console with
example:
GamePlay.gpLogServer(null, "Teststring", null);

Explanation
void gpLogServer(Player[] to, string format, object[] args);
first argument is the addressat.
null = all can read it.
new Player[]{ player} = single player
or Array of players, which will get the message

second parameter is the Message itself.

third parameter are additional values.
null = none.
new object[]{ value1, value2}
example:
GamePlay.gpLogServer(null, "Red has {0} Points, Blue has {1} Points", new object[]{redpoints, bluepoints});

moggel 04-08-2012 11:15 AM

Works perfectly! Thanks mate.

BTW: In C# you can initialize arrays implicitly:
GamePlay.gpLogServer(null, "Red has {0} Points, Blue has {1} Points", new[] {redpoints, bluepoints});

Cheers


All times are GMT. The time now is 08:27 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.