Jump to content

Sign in to follow this  
Drakkhen

Scripts & reloading

Recommended Posts

I told about it there first but it seems to be the right place to tell about it.

  [b said:
Quote[/b] ]The major problem with scripting seems to be when saving game and reloading:

running scripts state and past inits are not replayed on reload.

The result is this:

- if you were running a script when saving, after the reload it won't be restarted.

- if you ran an "init field one frame script" or set variables in an initfield of a PBO at the beginning of the game, it won't be replayed as you reload (some variables and other features of the addon can be missing or mis-set).

A simple thing would be some "save" and "reload" EventHandlers... with the ability to save unit script variables states too.

a solution was suggested using time, but for routines that doesn't loop (some IA script replacing the whole base behaviour), the current "sub-behaviour"[or state] of a unit can be lost since there will be no way to recover the behaviour choices on each nodes of the "behaviours tree".

Share this post


Link to post
Share on other sites

The one major mission I wrote had tons of scripts that ran from start to finish, and loading a savegame never screwed anything up. If this bug were true, then the mission I'm referring to would most definitely blow up upon a reload.

Are you referring to just eventhandlers, or all scripts, and do you have an exmaple mission that can demostrate this bug?

Share this post


Link to post
Share on other sites

Hmmm... the mission specific scripts continue but for a smoke script for example, its disturbed by another strange point:

put a group of M2s on the ground... fly circles over them with an A10 'til you get <50% status (you should see your script's trail ONLY) then save.

When you reload, the engine is stopping (you can turn it back on, though) and you have a second smoke trail you didn't have before saving.

For addon specific scripts, put a simple gear script in a new model, for example and save while the gear animation plays. After the reload (I consider here "gear in" action), the gears are still out while considered as in: making the available "gear out action makes the doors open but gears don't move, etc...

You can try it with any mod using gears with doors and more complex animation than a simple straight to forward rotation.

(The same problem with canopies, trails, dusters, doors, etc...)

Share this post


Link to post
Share on other sites

I think this is all related to eventhandlers and addon init scripts, which I think BIS fixed in their BETA patches. Are you testing this with 1.91 or the latest BETA - 1.96?

Share this post


Link to post
Share on other sites

I installed 1.96beta. By the way, is it normal the game keeps showing 1.91?

Hmmm guess it's because of beta. I installed it again and the version display remains the same. And the problem too.

Share this post


Link to post
Share on other sites
  (Drakkhen @ Mar. 12 2004,16:00) said:
I installed 1.96beta. By the way, is it normal the game keeps showing 1.91?

No it should show the proper version at the top. You have to launch the file 'FLASHPOINTBETA.EXE". You installed the BETA exe but you've been running OFP with your old shortcut, which loads up 1.91. tounge_o.gif

Either make a new shortuct that points to the flashpointbeta.exe file or update the existing shortcuts to point to the beta. smile_o.gif

Share this post


Link to post
Share on other sites

Ok, right for the version. Removes the twined trail and the scripts state reload.

Remains the unreplayed init scripts... Thanx.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×