Jump to content
Guest Bombyx

Scripting tutorial request

Recommended Posts

Guest Bombyx

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

Link to comment
Share on other sites

Guest Bombyx

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 ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest Bombyx

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 variable

int ref = v.GetUserData(); // this line is another variable, this store the userdata in v, or i don't know

v.UnattachSound(ref); // this line is used to ...

Audio::StopSample(ref); // .....

it could be great, and This could help many people...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...