ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
smal script question

« Previous 10 events | 1 2 3 | All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  14:32:25  1 July 2012
profilee-mailreply Message URLTo the Top
olaf1
Senior Resident
 

 
On forum: 01/17/2012
Messages: 240

---QUOTATION---
No you don't need that.

http://pastebin.com/FMg9NeDb

I changed the register and unregister functions to take the ids as parameters instead of the object itself so it shouldn't crash there anymore atleast.

Also in actor_binder make sure the spawn_manager save and load functions are the last ones call in the actor_binder save and load functions.

Put a print statement on load to make sure you are getting the right info loaded.
---END QUOTATION---



I have change this but i get this when i start he game


 
FATAL ERROR
 
[error]Expression    : fatal error
[error]Function      : CScriptEngine::lua_error
[error]File          : E:\stalker\patch_1_0004\xr_3da\xrGame\script_engine.cpp
[error]Line          : 73
[error]Description   : <no expression>
[error]Arguments     : LUA error: ...w of chernobyl\gamedata\scripts\spawn_manager.script:190: attempt to index global 'se_obj' (a nil value)
 

stack trace:




what you meen with

---QUOTATION---
Put a print statement on load to make sure you are getting the right info loaded.
---END QUOTATION---



how i shout make this???
  14:43:56  1 July 2012
profilee-mailreply Message URLTo the Top
Alundaio
Sad Clown
(Resident)

 

 
On forum: 04/05/2010
Messages: 2230
http://pastebin.com/nXBc4xy5


There should be a printf function at the bottom of the script.


printf("My message %s",variable)
  14:54:23  1 July 2012
profilee-mailreply Message URLTo the Top
olaf1
Senior Resident
 

 
On forum: 01/17/2012
Messages: 240

---QUOTATION---
http://pastebin.com/nXBc4xy5


There should be a printf function at the bottom of the script.


printf("My message %s",variable)
---END QUOTATION---



Thank you yet it works very perfekt i can load and load they resapwn when there balance is away.

Yet to my other question can i spawn and respawn the NPC´s when i shout in a other level or that not go???
and for waht is the respawn_radius ??
  23:12:07  1 July 2012
profilee-mailreply Message URLTo the Top
Alundaio
Sad Clown
(Resident)

 

 
On forum: 04/05/2010
 

Message edited by:
Alundaio
07/01/2012 23:18:03
Messages: 2230
Excuse me if I don't understand you correctly. I understand English isn't your main language.

1. Respawn Radius:
- If the actor is inside this radius the spawner will not try a respawn.

- Basically it's so that the Player does not see the NPCs being spawned around him. The spawning will only occur when actor outside the radius. If it doesn't matter just set it to 0.

2. Not sure if I understand what you mean? Do you mean if the NPCs spawn when the actor is on a different level? Hmm...I'm actually not sure I never tested that, lol. The reason I haven't bothered is that Call of Pripyat is only 3 maps and in vanilla NPCs don't travel to other levels so it's actually pointless. You'll have to test that out.

I'm glad you got it working. I saw you needed one and I needed one, so I wrote it up for us.

Oh, by the way. If you want the spawner to only spawn on certain conditions remove the commented lines in:


                --if (xr_logic.pick_section_from_condlist(actor, actor, xr_logic.parse_condlist(actor,"","",self.respawn) ) ~= "true") then

                        --return

                --end



Then you can do stuff like this in the config:


[my_section]
enable = {is_day} true, false

  12:17:21  2 July 2012
profilee-mailreply Message URLTo the Top
olaf1
Senior Resident
 

 
On forum: 01/17/2012
Messages: 240

---QUOTATION---
Excuse me if I don't understand you correctly. I understand English isn't your main language.

1. Respawn Radius:
- If the actor is inside this radius the spawner will not try a respawn.

- Basically it's so that the Player does not see the NPCs being spawned around him. The spawning will only occur when actor outside the radius. If it doesn't matter just set it to 0.

2. Not sure if I understand what you mean? Do you mean if the NPCs spawn when the actor is on a different level? Hmm...I'm actually not sure I never tested that, lol. The reason I haven't bothered is that Call of Pripyat is only 3 maps and in vanilla NPCs don't travel to other levels so it's actually pointless. You'll have to test that out.

I'm glad you got it working. I saw you needed one and I needed one, so I wrote it up for us.

Oh, by the way. If you want the spawner to only spawn on certain conditions remove the commented lines in:


                --if (xr_logic.pick_section_from_condlist(actor, actor, xr_logic.parse_condlist(actor,"","",self.respawn) ) ~= "true") then

                        --return

                --end



Then you can do stuff like this in the config:


[my_section]
enable = {is_day} true, false


---END QUOTATION---




yes Englisch is not my main language.

must i delet only this line that the npc´s respawn when i on a different level

		if (self.respawn_radius > 0 and game_graph():vertex(self.game_vertex_id):level_id() == game_graph():vertex(actor.m_game_vertex_id):level_id()) then
			if (actor.position:distance_to_sqr(self.position) < self.respawn_radius) then
				return
			end
		end

 
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-2021 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.