ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
execute script when level changing

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  16:28:39  23 May 2016
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
 

Message edited by:
Meltac
05/23/2016 16:28:54
Messages: 1519
execute script when level changing

Hi all

Does anybody know of a possibility to hook in script code to be executed upon level changing?

I mean a script being executed before (not after) the new level is loaded.

Thanks.
  23:59:33  23 May 2016
profilee-mailreply Message URLTo the Top
TKGP
Senior Resident
 

 
On forum: 01/25/2013
Messages: 454
I'm not aware of one, and the fact that TFW hacks it by moving the LCs out of bounds and putting a generic restrictor in their place that triggers a clone of the GUI and does whatever it needs to do before popping you over into the real LC would lead me to believe that there isn't a way (other than that).
That was a terrible sentence and I apologize.
  10:36:45  24 May 2016
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519

---QUOTATION---
That was a terrible sentence and I apologize.
---END QUOTATION---



No no, it was perfectly understandable - and I was afraid of that.

Thanks anyway.
  22:31:13  1 June 2016
profilee-mailreply Message URLTo the Top
TKGP
Senior Resident
 

 
On forum: 01/25/2013
Messages: 454
ВНИМАНИЕ ВНИМАНИЕ BLACK MAGIC ALERT

function actor_binder:save(packet)
	if game_graph():vertex( alife():actor().m_game_vertex_id ):level_id() ~= alife():level_id() then
		-- Do thing
	end


There are probably some timing issues with trying to do thing in the middle of saving but I was able to spawn myself a sausage just fine, and really, what more can you ask for?
  00:11:35  2 June 2016
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519
Works Many thanks - you're genius man
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2022 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.