Jump to content

AI_UPDATE_TIME and his friends


Recommended Posts

I found a bug which is quite obvious when you play BG2 and gemrb side by side.


When you start a new game, all animation are played 2 or 3 times. It seems that it affects only animations created by CreateVisualEffect*.


So I tried to debug it, and it appears that I don't quite understand how time is handled in gemRB.


So I have one or two questions :


what is AI_UPDATE_TIME ? from what I understand, every 1/AI_UPDATE_TIME seconds, scripts are updated.

How is it related to framerate ? (is it even related ?)

Link to comment

AH ? didn't find it....


BTW, why are not gamescript functions defined as in iesdp ?

I mean, all functions in gemrb have myfunction(scriptable* sender, action* target) as prototype.


For example, why not

DisplayStringHead( strref* string, scriptable* target) , where "target" is the character to display "string" over his head ?

Link to comment

Because the prototype is common, but the parameters are variable, even for the same action/trigger.

It is easier to pass a single pointer than several variables.

All of the parameters are in the parameters object.

They are loaded straight from the .bcs


The sender (the entity which runs the script) is different.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...