Aller au contenu

Photo

Events and my brain do not mix


1 réponse à ce sujet

#1
georage

georage
  • Members
  • 247 messages
I need help getting my head around area events.

I created a var_mymod 2DA and it works, the script AND04 created to display the names of items acquired never fails to work.

That is the ONLY event I can capture it seems.

In the 2DA I ALSO route all the area events to the same custom event handler script, but those events apparently never fire INTO the script. Debug messages never appear, so I know it is not firing when I enter areas.

What am I missing? Should I replace the area_core script on each area with my custom event handler script?

I am trying to use OnEnter type scripts to set up the areas depending on what point in the plot the player is at. I have been forced to use triggers at entrypoints, but fear those will not fire when a player loads up a save game.

Thanks for any help! Sorry to be posting so many questions. 

Modifié par georage, 08 décembre 2009 - 08:38 .


#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
A script is only going to be run if something tells it to run. The engine needs to be told to run your script somewhere. The most basic way of doing that is making the script the default for the object, in this case the area. That will pass (almost) all events the object receives to your script. If you're making a stand-alone module or adding a new area into the main campaign, that's definitely the way to go.



You can also tell a script to run on area load using 2das, but I don't recommend that unless you want it to be a mod which is placed on top of other modules. I don't know much about that functionality myself, as it wasn't used at all to make the main campaign. It's a system designed for DLC and while I'm sure it will also be used for other mods, it's not the primary way of handling events in a normal module and it’s much more complicated than just making a standard script and attaching it to the object.