Aller au contenu

Photo

Disabling Pause


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
mtottenh

mtottenh
  • Members
  • 5 messages
I'm trying to disable the pause feature for a mod. (I know, it sounds like a  terrible idea but the mod is built around not having to pause the game)

Having read a few threads about similar sorts of subjects I tried to create a heartbeat style event which would just unpause the game every second or so.

I can't seem to get it working properly. I've enabled logging and I can see that my Event is being run but the ToggleGamePause(FALSE) (or ToggleGamePause(0)) function doesn't seem to do anything,
Also the event doesnt seem to be run during a game pause, even though when I'm calling it I'm using
SignalEvent(OBJECT_SELF, Event(EVENT_TYPE_UPAUSE),1);

If there is a better way of going about this let me know, (I know its quite a messy/resource intensive way of doing things )

#2
mtottenh

mtottenh
  • Members
  • 5 messages
bump



Note to self: Edit post to include current code

#3
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages
I think you cannot do it through events. Usually the pause effect is achieved by changing the game into a different state, so the game logic is not updated and game events are not processed. I don't know if there is another way, sorry.

Modifié par _L_o_B_o_, 18 novembre 2010 - 09:30 .


#4
Nattfodd

Nattfodd
  • Members
  • 321 messages
The game state changes event is sent to module script: i think you must handle the EVENT TYPE GAMEMODE CHANGE.

#5
Proleric

Proleric
  • Members
  • 2 350 messages
Good thought, but unfortunately pausing the game doesn't seem to fire any module events.