Still on ther same subject - that piece of code Maruis just posted works for !case wirth no problems at all.
And when the same syntax was used for car reset it worked also.
But with an autocross object - it doesn't.
I replaced the event trigger code (MSO) with the one the InSim.txt lists as AXO and nothing happens. No errors, but no action either.
Obviously there are rules governing the use of these codes - where you can use it in a basic form such as (NCN.UCID) and where you need the more complicated version such as (Connections[GetConnIdx(MSO.UCID)].UniqueID)
Feel free to say 'bog off n00b' if you like, but I thought I'd share what I've learnt in the last few days.
This is for ABSOLUTE beginners to C#, and is FAR from complete.
I'm posting it in it's unfinished state because I don't want to finish it with total inaccuracies - so feel free to rip it to shreds - and when it's finished I'll add a thanks section on the end mentioning everyone who contributed
I'd have killed for a guide like this when I started - in fact, if anyone has a finished one I'd still love to have it
Last edited by drew555, .
Reason : Removed obsolete n00b guide.
I'm using the base InSIm template that's avaliable here - and hammering the hell out of it as I learn - while also making my own .txt guide as I go along, with info stolen from whoever will have the patience to help!
Therefore I assume that MCI packets are enabled 'by default', and that a time interval is already specified.
Now I need to figure out where in the program this is specified, play with it and try to figure it out.
So.... if I have the MCI packets set to be sent every 1 second for example and have a command in the script that says something like:
Or...
Where: On recieving an MCI packet, make a button, take from this packetofthis partand display tothis player?
I invented this - so is probably totally wrong - any clarification is gratefully recieved (in n00bspeak if at all possible ).
I have had a look through the documentation I have - and can't find what I'm looking for.
This part:
$DriftDatabase = "./DriftPB";
$MinimumDriftSpeed = 30; # Minimum speed in km/h to maintain. Driving below that speed will reset score
$MinimumDriftAngle = 15; # Minimum angle to maintain. When angle is below value, score is reset
$MaximumDriftAngle = 210; # Maximum angle to maintain. When angle is above value, score is reset
Is there somrthing in Lapper that allows me to perform an action on drift score reset - perhaps something like OnDriftScoreReset:
Somewhere with lists of all the usable commands and suchlike - maybe just a collection of all the documentation created for all the variations of lapper.
LFSLapper.lfs has a good one at the beginning - but it doesn't seem to cover all of the avaliable commands and variables- and what they do.
Might stop a lot of frustration for people who are brand new to lapper.
I actually binned the open source cruise InSim - there was like waaaaay loads in there, and it just ended up confusing me.
I ended up downloading the base InSim and am going from there, using the open source cruise server for reference.
Seems to be working OK so far - with a little help from someone in MSN who's a little further down the road than me - thanks Maruis mwah.
I've got a couple of buttons on the go - now it's just patching up the differences between c# and GLScript...
Advice? Start with Lapper After that, C# is so much easier to digest.
Anyone have any good links to cheat sheets?
What I'm after now is something like Gai Luron has in the beginning of the Lapper scripts, basically giving me enough innformation to really get it badly wrong
I've been playing with Lapper (basically just ripping the code to bits and making it up as I'm going along when I'm not annoying Gai) and I've kinda gotten myself a hankering for making my own InSim app.
In fact, any kind of app
I am not even close top a programmer - but... I have downloaded the Open Source Cruise InSim app along with Microsoft Visual C# 2008 Express and want to hack about with it and asee what the crack is.
I'll be playing with it and learning as I go, using tutorials I find on the web and on here begging for help no doubt.
Here's where I ask you for your help
I need a push in the right direction - and the direction I need is the one in which I can edit the source files and recompile them into something I can run so that I can see my changes.
There are lots of files, and talk of Solutions and suchlike, and I'm a bit lost in it all.
I'd love to learn how to do this properly - but at the moment I want to play with it before I try to learn it the proper way - I intend to learn by editing and progress as I can.
So folks, who's feeling helpful?
Which files do I need to edit to change stuff - and once I edit them, how do I go about recompiling them?
Here's where I got to.
I opened the Form1.cs file with VS (as I believe it is written) and changed a few things - but I don't know where to go next - the compile button appears to be greyed out - and every tutorial I have seen has assumed more knowledge than I have