 |
 |
 |
|
 |
 |
 |
|
 |
 |
Of smart terrains, space restrictors and gulags |
|
« Previous 10 events | 1 2 3 4 5 6 7 8 9 10 ... 13 | Next 10 events »| All Messages |
|
|
15:55:17 3 February 2011 |
|
crucifist
(Senior) On forum: 12/14/2009
 Message edited by: crucifist 02/03/2011 15:57:10
Messages: 105
|
---QUOTATION---
@Rubber Baron
thx for claryfiing this!
It doesn't change the fact, that we don't know, how did crucifist merged the generators level, or from which mappack did he grab it. I believe only in what i can open in level editor and check it with xrai. ---END QUOTATION---
I use Old Storyline Restoration as a base for my modification. I have added NPC with smart terrain, gulag and logic and all works fine.
I know that there are smart terrains in dead city, but none in Generators.
Should I check something with the level editor?
I have this error in my xray (no crash):
! Unknown command: dbg:!-!-!-_Принудительный_Вылет_-!-!-!
! Unknown command: dbg:!-!-!-_Принудительный_Вылет_-!-!-!
! Unknown command: dbg:!-!-!-_Принудительный_Вылет_-!-!-!
The russian words, translated with google, are:"Forced Departure"
I have added the function to lauch the respawn. It is executed (I use
get_console():execute("my_comment") to verify), but it doesn't respawn. |
09:15:44 4 February 2011 |
|
crucifist
(Senior) On forum: 12/14/2009
Messages: 105
|
Thanks for your help! It works in Generators with my new spawn_section. I need to call the script in the menu of course! I have also tested in garbage, it works too. Now, I have to understand why it doesn't spawn without manual call of the script ... |
20:11:09 4 February 2011 |
|
crucifist
(Senior) On forum: 12/14/2009
 Message edited by: crucifist 02/04/2011 20:12:42
Messages: 105
|
The complete section or file?
As I'm not sure:
;-------------------------------Generator -------------------------------
[gen_stalker_respawn_1]:stalker
$spawn = "respawn\gen_stalker_respawn_1"
character_profile = sim_stalker_master
spec_rank = master
community = stalker
[gen_stalker_respawn_2]:stalker
$spawn = "respawn\gen_stalker_respawn_2"
character_profile = sim_stalker_master
spec_rank = master
community = stalker
In fact I think it's a problem bound to smart terrain and gulag. I don't specify that my respawned character has to work for my smart terrain. But it's a little strange ... When I kill the 2 NPCs, my respawned character (called by the menu) takes a job and work for the smart terrain.
Is it bound to the community accepted in the smart terrain?
To test, I kill my two NPCs, then leave to another map. Once I'm there, I call a function wich accelerates time but the respawn doesn't work.
Here's my smart terrain:
[9091]
; cse_abstract properties
section_name = smart_terrain
name = smart_generators_village
position = -110.64280700684,37.96125793457,-490.61651611328
direction = 0,0,0
; cse_alife_object properties
game_vertex_id = 2981
distance = 10.3999977111816
level_vertex_id = 198275
object_flags = 0xffffffbe
offline = false
custom_data = <<END
[smart_terrain]
type = smart_generators_village
capacity = 2
;squad = 8
;groups = 5
communities = stalker
END
; cse_shape properties
shapes = shape0
shape0:type = sphere
shape0:offset = 0,0,0
shape0:radius = 1.64799988269806
; cse_alife_space_restrictor properties
restrictor_type = 0
; se_smart_terrain properties
My respawn:
[9094]
; cse_abstract properties
section_name = respawn
name = gen_stalker_respawn_1
position = -110.88652038574,37.427352905273,-480.15625
direction = -0.0328151993453503,-0.00691708410158753,-0.207787200808525
; cse_alife_object properties
game_vertex_id = 2966
distance = 16.7999992370605
level_vertex_id = 191156
object_flags = 0xffffff3e
custom_data = <<END
[respawn]
respawn_section = gen_stalker_respawn_1
max_count = 2
min_count = 2
max_spawn = 2
idle_spawn = often
END
; cse_shape properties
shapes = shape0
shape0:type = sphere
shape0:offset = 0,0,0
shape0:radius = 1
; cse_alife_space_restrictor properties
restrictor_type = 0
; se_respawn properties
Call of jobs of the ST:
if type == "smart_generators_village" then
t = {}
t.section = "logic@smart_generators_village0"
t.idle = 0
t.timeout = 0
t.prior = 100
t.state = {0}
t.squad = squad
t.group = groups[1]
t.position_threshold = 100
t.online = true
t.in_rest = ""
t.out_rest = ""
table.insert(sj, t)
t.section = "logic@smart_generators_village1"
t.idle = 0
t.timeout = 0
t.prior = 100
t.state = {0}
t.squad = squad
t.group = groups[1]
t.position_threshold = 100
t.online = true
t.in_rest = ""
t.out_rest = ""
table.insert(sj, t)
end
I'm not a LUA programmer but I have notions in POO (I don't know how to say it in english, so I mean "object language" . So I can understand scripts. I'm going to check that! |
13:32:54 5 February 2011 |
|
crucifist
(Senior) On forum: 12/14/2009
 Message edited by: crucifist 02/05/2011 15:00:26
Messages: 105
|
I have done a lot of testes. It's very strange:
In fact, only 1 NPCs can be respawned in my smart terrain (using the call). The two stalker spawned in the smart terrain have to be dead to get respawn work. I have deleted in all.spawn two stalker sections which were spawned in the smart terrain. Now, if I call the respawn function, nothing happened. I don't understand anything ...
No way to get it work. Aaaargh
EDIT: what is the output of the printf() function?
EDIT2: I'm checking the execution of the se_respawn() function.
Actually, when I call the script from the menu, those "instructions" are executed:
function spawn(name)
local spawner = respawners[name]
if spawner == nil then
get_console():execute("nil") --not executed
return
end
for i=1,spawner.max_spawn do
get_console():execute("enter_spanwer_loop") --executed
if spawner.max_count ~= -1 and table.getn(spawner.spawned_obj) >= spawner.max_count then
get_console():execute("cant_spawn_max_count_reach") -- not executed
return
end
if spawner:create(xr_logic.pick_section_from_condlist(db.actor_proxy, spawner, spawner.conditions)) == false then
get_console():execute("WTF") -- I don't know the goal of this function. It is executed
return
end
end
EDIT: when I call the respawn and get it work state of the smart terrain is verified. I have also the error that I have mentionned before: dbg:error --! blah blah !--
The smart terrain isn't checked when the respawn doesn't work.
I have also seen that when I kill a respawned NPC I get an error in my log:
v:ge_destroy[2888]: not found on server
EDIT3: only the second job bound to the ST is loaded when respawning.
EDIT4: there was a mistake in my gulag script. I have corrected it. But now, my respawned NPC won't load its logic, bu is bound to ST. |
16:08:43 5 February 2011 |
|
crucifist
(Senior) On forum: 12/14/2009
 Message edited by: crucifist 02/05/2011 16:14:11
Messages: 105
|
The smart terrain capacity is set to 10. The capacity in se_repspawn.script is set to 99 for each kind of stalker.
My testes don't help me for the moment erf
EDIT: attribution of the ST is only linked to the NPC community? |
|
« Previous 10 events | 1 2 3 4 5 6 7 8 9 10 ... 13 | Next 10 events »| All Messages |
|
|
|
» » |
|
All short dates are in Month-Day-Year format. |
 |
|
 |
|
|
|
 |
 |
 |