Hiya,

I'm trying to create my own script engine to implement for a 3d engine but I got stumped

It seems that there aren't really examples on how to write a real script engine (as opposed to C++ who has lots of them)..

So I wondered if someone here has a clue how to write something like this..

I kinda would like to have files like: demo.script

scene1.modelmove {
movemodel (objPlayer, 120, 1, -20);
wait_until_model_gets_there (objPlayer, 120,1,-20);
subtitle_add (subtitledictionary(2));
play_sfx(voicedictionary(2));
wait_until_sfx_ended;
}

or something like that...

Basically it would be used for in-game script events and triggers. But if I have the basic setup of the script engine I would love to upgrade it with stuff like adding functions, 'subs' and other reusable components. (instead of using 'runtime' defined functions)

sub setup_model_at(x,y,z,object, AI_ID) {
create_model (object, "/data/model.md3")
place_model (x,y,z)
trigger_ai_for(object, AI_ID)
}


If someone has any clue how this stuff is easy made in VB.... I would be very grateful..