Aller au contenu

Photo

Events processing during pause


6 réponses à ce sujet

#1
anakin5

anakin5
  • Members
  • 258 messages
The main question is "How to flag an event to be processed during pause ?".

I am using SignalEvent function inside EVENT_TYPE_EQUIP.

EVENT_TYPE_EQUIP can be processed while the game is in pause but the custom event I send to the same character is processed only after the pause.

case EVENT_TYPE_EQUIP:
{
    event ev = Event(CUSTOM_EVENT);
    SignalEvent(OBJECT_SELF, ev);

    break;
}

#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
Did you try setting the process immediately paramater on SignalEvent to TRUE? If that doesn't work, I suspect events created by scripting can't be processed while the game is paused.

#3
anakin5

anakin5
  • Members
  • 258 messages
I did it and that makes the event beeing processed immediately. The problem is that I don't want to process it before the end of EVENT_TYPE_EQUIP.

It is not a whim, it is just that doing it immediately or after EVENT_TYPE_EQUIP change the behavior of my event.



When you switch your weapon set, the game seems to switch your weapons, then effectively update your weapon set.

Assume I am switching from weapon set 0 to weapon set 1, GetActiveWeaponSet return 0 in EVENT_TYPE_EQUIP if the switch triggered this event (if you have a weapon in weapon set 1).

GetActiveWeaponSet will return 1 in my custom event.



So that's why I need to process my event after EVENT_TYPE_EQUIP, to let the active weapon set being updated. I have no problem with it outside of game pause.



By the way, I am sending the event to OBJECT_SELF with SignalEvent. But I can send it to an other object if needed. My idea is that maybe the player is affected by "pause" while and other object is not. I tried with GetModule but the module doesn't process event during pause as well.

#4
Magic

Magic
  • Members
  • 187 messages
If you're looking for a hack, maybe you can use the equip event with a custom parameter and check for it in the handler. ^^

#5
anakin5

anakin5
  • Members
  • 258 messages
It is like I solved my problem. Well, I didn't find a way to process an event as soon as this event is queue during pause, it seems that only the engine has the right to do that.



The engine function I wanted to call cannot be called during pause as well :) So it doesn't matter if I succeed or not to send this event.

#6
SuperD-710

SuperD-710
  • Members
  • 130 messages
Darn, it looks like you made a quickbar mod too. I wish I'd found this before wasting the time lol

BTW, even if you had found a way to process the event immediately it wouldn't matter. Quickbar does not swap during pause.

Modifié par SuperD-710, 05 février 2010 - 05:33 .


#7
Magic

Magic
  • Members
  • 187 messages
In a quick test, the bProcessImmediate parameter is doing the difference for me, even for custom events.

SignalEvent(OBJECT_SELF, ev, TRUE);

Nice. At least, I know now what this parameter is good for. :)