project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding
07 Dec 2019, 00:00:00 (PRT)
Register Developer Blogs Project Reality Members List Search Today's Posts Mark Forums Read
PR:BF2 Community Modding Making or wanting help making your own asset? Check in here

Reply
 
Thread Tools Display Modes
Old 2019-11-10, 12:13   #1
sertek
Post [Python] How to reload a custom script?

Hello,

I'm working on some local python scripts and I would like to know if there is any way to reload a script without having to restart my game every time because it's really painful
sertek is offline Reply With Quote
Old 2019-11-10, 14:44   #2
[R-DEV]​AlonTavor
PR:BF2 Developer
PR Server License Administrator
Default Re: [Python] How to reload a custom script?

Reload works
https://www.geeksforgeeks.org/reloading-modules-python/

Obviously, any events registered will still use the old functions. You'll need to unregister them and then register them again.
AlonTavor is offline Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 19:08.