Guest Bombyx Posted August 11, 2009 Report Share Posted August 11, 2009 Hi everybody, Does any Scripting tutorial exist about emergency 4 ? I'd like to start scripting, and C++ is pretty easy to use, but there is some particular commands about the game, and I'd like to know if hoppah has made a tutorial to explain how to script in C++ and game language ?Thanks for help Quote Link to comment Share on other sites More sharing options...
Luisinho Posted August 11, 2009 Report Share Posted August 11, 2009 Not that I'm aware of. Actually, there isn't one.You can find C++ tutorials all over the web, you will learn a lot from them. It's really similar to pawno.Edit: I found this, it looks from what I've seen: helpful http://www.cplusplus.com/doc/tutorial/ Quote Link to comment Share on other sites More sharing options...
Guest Bombyx Posted August 11, 2009 Report Share Posted August 11, 2009 As I said, C++ is pretty easy to use, but there is some commands like CallerId, m.EnableBlueLights(false), some syntax that is only used in EM4, and I'd like to have some info about it...For exemple, I'd like to add a new parked vehicle at start, what should I add ?I've add a VO in the editor, but when I start to write the line : ActorList XXX = Game::GetActors(VO_NEWVEHICLE);, what should I place at the place of the XXX, where is the variable definition ? Quote Link to comment Share on other sites More sharing options...
Tim Posted August 11, 2009 Report Share Posted August 11, 2009 Take a look at the SDK: http://www.emergency-wiki.de/index.php/Kategorie:Scripts Well, it is in german, but the only available overview of all the classes usable in EM4 scripts.If you do not understand whats written in the SDK, I recommend that you take a look at some C++ tutorials.edit: I read your last post, and it seems to me that you do not really know C++. Instead of the XXX you just put in your prefered variable name. If you have problems with such basic things, I really recommend looking for a C++ tutorial. Quote Link to comment Share on other sites More sharing options...
Guest Bombyx Posted August 11, 2009 Report Share Posted August 11, 2009 yeah I put a nomber, for exemple 55, but I've got a script error, and tells me that the variable is already used or something like this... Quote Link to comment Share on other sites More sharing options...
Tim Posted August 11, 2009 Report Share Posted August 11, 2009 A variable's name must not only consist of numerics. Combinations of numerics and letters are allowed, e.g. "list01".Additionaly, those names may not have spaces, if you want to separate something, use the underline("_").Special characters, and C++ keywords ("new","true","false"....) may NOT be used, too. Quote Link to comment Share on other sites More sharing options...
Guest Bombyx Posted August 11, 2009 Report Share Posted August 11, 2009 lol ok, I read the L9 for 19, so I doesn't understand, thanks a lot .now, can you tell me how to add the "return to fire station" button to a vehicle ? Quote Link to comment Share on other sites More sharing options...
Guest Bombyx Posted August 11, 2009 Report Share Posted August 11, 2009 is it possible for hoppah to take a while, post one of his script and make comments line by line, for exemple :int CarID = v.GetID(); //this line is a variableint ref = v.GetUserData(); // this line is another variable, this store the userdata in v, or i don't knowv.UnattachSound(ref); // this line is used to ...Audio::StopSample(ref); // .....it could be great, and This could help many people... Quote Link to comment Share on other sites More sharing options...