Jump to content

Photo

Mods extending Core and events


  • Please log in to reply
2 replies to this topic

#1
Soulforged

Soulforged

    Stranger

  • Members
  • Pip
  • 6 posts
I have a simple question: Can you make your module extend "Core game resources" and still have it handle events in a custom event script?

I ask this because I'm trying to get a few things done, one of them is letting the player access the party picker from any area. I got it to work by overriding one of the core scripts (area_core) and making a modification to the EVENT_TYPE_AREA_SPECIAL. However when I tried to make the same thing (capturing that event and handling it, the same way) in a custom script the same event could never be captured, I cannot tell the reason yet. Then I made my module extend "Core game resources" (it was extending "Single Player" as you can deduce by now) and tried the same thing with a custom script, it didn't work. I modified the script to react to the EVENT_TYPE_MODULE_LOAD in addition to the other events, but nothing happened either.

That's the reason I ask.

#2
jwvanderbeck

jwvanderbeck

    Fan

  • Supporter
  • PipPipPip
  • 284 posts
You want to extend Single Player, not Core. Core isn't a campaign.

The trick to making some of these events work is that the script being run need to be a core script. In other words, when you create the script resource, set the MODULE to Core. The OWNER MODULE should still be your module.

#3
Soulforged

Soulforged

    Stranger

  • Members
  • Pip
  • 6 posts

You want to extend Single Player, not Core. Core isn't a campaign.

The trick to making some of these events work is that the script being run need to be a core script. In other words, when you create the script resource, set the MODULE to Core. The OWNER MODULE should still be your module.

I did that. That particular event escapes the scope that you can see from a module extending Single Player.

I supposed as much about extending Core, but I could not see any other way. Overriding the handler script on engineevents.gda doesn't work either.




Page loaded in: 0.964 seconds