Перейти к контенту

Скриптование


Svoboда

Рекомендуемые сообщения

Здраствуйте.

Вот создал нового торговца в ЗП, и прописал ему такую логику:

[logic]
prior = 200
active = remark
danger = danger_ignore
level_spot = trader
can_select_weapon = false
trade = misc\trade\trade_otshel.ltx

[danger_ignore]
ignore_distance = 5

[remark]
no_move = true

 

(Если я не ошибаюсь, то торговец должен торговать и стоять на месте.)

Но при подходе к торговцу получаю вылет:

Expression    : !m_error_code
Function      : raii_guard::~raii_guard
File          : D:\prog_repository\sources\trunk\xrServerEntities\script_storage.cpp
Line          : 748
Description   : ....e.r. - Cia I?eiyoe\gamedata\scripts\xr_logic.script:939: bad argument #1 to 'gfind' (string expected, got nil)

 

(Опять же, как я правильно понял, это неверная логика.)

Подскажите, в чём моя ошибка? Заранее спасибо.

Изменено пользователем Artos

Поделиться этим сообщением


Ссылка на сообщение

Заспавнил торговца через смарт терраин. Получил вылет.

Что не так вот здесь:

squad_descr.ltx

 

[darkscape_stalker]:online_offline_group

faction = stalker

sympathy = 1

npc = otshel

target_smart = darkscape_stalker_smart

spawn_point = zat_stalker_base_smart_spawn_barmen

story_id = darkscape_stalker

 

 

darkscape_stalker_smart.ltx

 

[smart_terrain];darkscape_stalker_smart

max_population = 1

 

[exclusive]

;darksape_stalker = darkscape\otshel_logic.ltx

 

 

otshel_logic.ltx

 

[logic@darksape_stalker]

suitable = {=check_npc_name(otshel)} true

trade = misc\trade\trade_otshel.ltx

prior = 200

active = animpoint@bar_les

can_select_weapon = false

level_spot = trader

 

[animpoint@bar_les]

cover_name = zat_a2_sc_barmen

avail_animations = animpoint_stay_table_no_rnd

use_camp = false

meet = meet

combat_ignore_cond = true

combat_ignore_keep_when_attacked = true

invulnerable = true

gather_items_enabled = false

help_wounded_enabled = false

corpse_detection_enabled = false

 

 

 

simulation.ltx

 

;;;;;;;;;;;;;;;;;;;;;;;; darkscape ;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[start_position_darkscape]

darkscape_stalker = darkscape_stalker_smart

 

 

 

Секция спавна

 

[124]

; cse_abstract properties

section_name = smart_terrain

name = darksape_stalker_smart

position = 250.339569091797,-0.22316600382328,-195.362701416016

direction = 0.106533996760845,-1.49463295936584,0.104124002158642

 

; cse_alife_object properties

game_vertex_id = 0

distance = 9.80000019073486

level_vertex_id = 58518

object_flags = 0xffffff3e

custom_data = <<END

[smart_terrain]

cfg = scripts\darkscape\smart\darksape_stalker_smart.ltx

END

 

; cse_shape properties

shapes = shape0

shape0:type = sphere

shape0:offset = 0,0,0

shape0:radius = 20

 

; cse_alife_space_restrictor properties

restrictor_type = 3

 

; se_smart_terrain properties

 

 

 

Помогите. Бьюсь со смартами уже вторую неделю.... Направте на правильный путь.

Вот лог вылета:

 

Expression : !m_error_code

Function : raii_guard::~raii_guard

File : D:\prog_repository\sources\trunk\xrServerEntities\script_storage.cpp

Line : 748

Description : ...e.r. - Cia I?eiyoe\gamedata\scripts\sim_board.script:226: attempt to index local 'spawn_smart' (a nil value)

 

 

Заранее спасибо.

А верcию и патч игры - нам всем Пушкин подскажет?

--/ Artos

Изменено пользователем Artos

Поделиться этим сообщением


Ссылка на сообщение

Извините. Забыл. Патч 1,6,02.

Спавн проверен. Всё на месте.

Я сомневаюсь в этом:

[darkscape_stalker]:online_offline_group    
faction = stalker 
sympathy = 1 
npc = otshel 
target_smart = darkscape_stalker_smart правильно ли?
spawn_point = zat_stalker_base_smart_spawn_barmen 
story_id = darkscape_stalker - правильно ли?

Просто это(правильно ли?) нигде не прописано.

Поделиться этим сообщением


Ссылка на сообщение

Artos, заменил на это:

[darkscape_stalker]:online_offline_group    
faction = stalker
sympathy = 1
npc = otshel
target_smart = darkscape_stalker_smart
spawn_point = zat_stalker_base_smart_spawn_barmen
story_id = 1

Такой же вылет :(

Поделиться этим сообщением


Ссылка на сообщение

Помогите пожалуйста. Я прописал в логику НПСу воспроизведения звука при приближению к нему(как у Бороды, Сыча и т.д.).

Только звука нет. Вот логика:

[logic]

trade = misc\trade\holod.ltx

active = remark

prior = 200

can_select_weapon = true

level_spot = trader

combat_ignore = combat_ignore

 

[combat_ignore]

 

[remark]

anim = animpoint_stay_table_no_rnd

combat_ignore_cond = true

combat_ignore_keep_when_attacked = true

meet = meet

invulnerable = true

gather_items_enabled = true

help_wounded_enabled = true

corpse_detection_enabled = true

 

[meet]

close_snd_hello = holod_greeting

close_snd_bye = holod_farewell

close_anim = nil

close_victim = nil

far_anim = nil

far_victim = nil

close_distance = 0

far_distance = 0

close_snd_distance = 3

abuse = true

use = {=actor_enemy} false, true

allow_break = true

meet_on_talking = true

 

 

 

Звук пописан здесь:

[list_script_sound_marsh]

holod_greeting

holod_farewell

 

 

[holod_greeting]

type = npc

;npc_prefix = false

path = scenario\marsh\holod\holod_greeting_

shuffle = rnd

idle = 0,0,100

 

[holod_farewell]

type = npc

;npc_prefix = false

path = scenario\marsh\holod\holod_farewell_

shuffle = rnd

idle = 1,1,100

 

 

 

А файл script_sound_marsh.ltx прописан здесь:

#include "script_sound_music_and_stories.ltx"

#include "script_sound_zaton.ltx"

#include "script_sound_jupiter.ltx"

#include "script_sound_pripyat.ltx"

#include "script_sound_underpass.ltx"

#include "script_sound_marsh.ltx"

  • : list_music_and_stories, list_script_sound_zaton, list_script_sound_jupiter, list_script_sound_pripyat, list_script_sound_underpass, list_script_sound_marsh

 

 

 

Подскажите пожалуйста, что я упустил, в чём моя ошибка?

P.S.:Также, есть звуки:

holod_farewell_1,

holod_farewell_2,

holod_greeting_1,

holod_greeting_1

 

Изменено пользователем zoidberg123456789

Поделиться этим сообщением


Ссылка на сообщение

Сделал я анимпоинт в смартерраине. Заспавнил сквад. Непись(у него новая группировка) ест хлеб, колбасу, но не играет на гитаре, и не рассказывает анекдоты...

Как сделать?

В файлах script_sound_music_and_stories и script_sound группировка прописна:

[list_music_and_stories]

attack_begin

attack_begin_reply

 

alife_stalker_counter_check

alife_bandit_counter_check

alife_dolg_counter_check

alife_freedom_counter_check

alife_army_counter_check

alife_clear_sky_counter_check

 

alife_stalker_counter_begin

alife_stalker_counter_reply

alife_bandit_counter_begin

alife_bandit_counter_reply

alife_dolg_counter_begin

alife_dolg_counter_reply

alife_freedom_counter_begin

alife_freedom_counter_reply

alife_army_counter_begin

alife_army_counter_reply

alife_clear_sky_counter_begin

alife_clear_sky_counter_reply

 

intro_music

play_guitar

reac_music

 

play_harmonica

 

intro_joke

joke

reac_joke

reac_laugh

 

;***************************************************************

;** Сбор отряда в атаку

;***************************************************************

[attack_begin]

type = npc

avail_communities = stalker, bandit, dolg, freedom, army, clear_sky

npc_prefix = true

path = alife\attack\attack_begin_

shuffle = rnd

idle = 0,0,100

 

[attack_begin_reply]

type = npc

avail_communities = stalker, bandit, dolg, freedom, army, clear_sky

npc_prefix = true

path = alife\attack\begin_reply_

shuffle = rnd

idle = 0,0,100

;group_snd = true

 

[alife_clear_sky_counter_check]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\csky\alife\counter_attack\check_

shuffle = seq

idle = 0,0,100

 

[alife_stalker_counter_check]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\stalker\alife\counter_attack\check_

shuffle = seq

idle = 0,0,100

 

[alife_bandit_counter_check]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\bandit\alife\counter_attack\check_

shuffle = seq

idle = 0,0,100

 

[alife_dolg_counter_check]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\dolg\alife\counter_attack\check_

shuffle = seq

idle = 0,0,100

 

[alife_freedom_counter_check]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\freedom\alife\counter_attack\check_

shuffle = seq

idle = 0,0,100

 

[alife_army_counter_check]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\military\alife\counter_attack\check_

shuffle = seq

idle = 0,0,100

 

[alife_clear_sky_counter_begin]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\stalker\alife\counter_attack\counter_attack_begin_

shuffle = rnd

idle = 0,0,100

 

[alife_clear_sky_counter_reply]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\stalker\alife\counter_attack\reply_

shuffle = rnd

idle = 0,0,100

 

[alife_stalker_counter_begin]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\stalker\alife\counter_attack\counter_attack_begin_

shuffle = rnd

idle = 0,0,100

 

[alife_stalker_counter_reply]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\stalker\alife\counter_attack\reply_

shuffle = rnd

idle = 0,0,100

 

[alife_bandit_counter_begin]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\bandit\alife\counter_attack\counter_attack_begin_

shuffle = rnd

idle = 0,0,100

 

[alife_bandit_counter_reply]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\bandit\alife\counter_attack\reply_

shuffle = rnd

idle = 0,0,100

 

[alife_dolg_counter_begin]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\dolg\alife\counter_attack\counter_attack_begin_

shuffle = rnd

idle = 0,0,100

 

[alife_dolg_counter_reply]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\dolg\alife\counter_attack\reply_

shuffle = rnd

idle = 0,0,100

 

[alife_freedom_counter_begin]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\freedom\alife\counter_attack\counter_attack_begin_

shuffle = rnd

idle = 0,0,100

 

[alife_freedom_counter_reply]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\freedom\alife\counter_attack\reply_

shuffle = rnd

idle = 0,0,100

 

[alife_army_counter_begin]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\military\alife\counter_attack\counter_attack_begin_

shuffle = rnd

idle = 0,0,100

 

[alife_army_counter_reply]

type = actor

actor_stereo = false

npc_prefix = false

path = characters_voice\human_02\military\alife\counter_attack\reply_

shuffle = rnd

idle = 0,0,100

 

 

;************************************************************

;** Игра на гитаре

;************************************************************

[intro_music]

type = npc

avail_communities = stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = talk\intros\intro_music_

shuffle = rnd

idle = 1,1,100

 

[play_guitar]

type = 3d

avail_communities = stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = music\guitar_

shuffle = rnd

idle = 1,1,100

 

[reac_music]

type = npc

avail_communities = stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = reactions\music\reaction_music_

shuffle = rnd

idle = 1,1,100

group_snd = true

 

[play_harmonica]

type = 3d

avail_communities = stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = music\harmonica_

shuffle = rnd

idle = 1,1,100

 

;***************************************************************

;** Истории

;***************************************************************

[intro_joke]

type = npc

avail_communities = stalker, bandit, dolg, freedom, army, monolith, clear_sky

npc_prefix = true

path = talk\intros\intro_joke_

shuffle = rnd

idle = 0,0,100

group_snd = true

 

[joke]

type = npc

avail_communities = stalker, bandit, dolg, freedom, army, monolith, clear_sky

npc_prefix = true

path = talk\jokes\joke_

shuffle = rnd

idle = 0,0,100

group_snd = true

 

[reac_joke]

type = npc

avail_communities = stalker, bandit, dolg, freedom, army, monolith, clear_sky

npc_prefix = true

path = reactions\joke\reaction_joke_

shuffle = rnd

idle = 0,0,100

group_snd = true

 

[reac_laugh]

type = npc

avail_communities = stalker, bandit, dolg, freedom, army, monolith, clear_sky

npc_prefix = true

path = reactions\story\laughter_

shuffle = rnd

idle = 0,0,100

group_snd = true

 

 

 

[meet_hello]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = states\meet\meet_hello_

shuffle = rnd

idle = 2,2,100

 

[meet_hide_weapon]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = states\meet\meet_hide_weapon_

shuffle = rnd

idle = 5,7,100

 

[meet_use_no_default]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = states\meet\meet_use_no_default_

shuffle = rnd

idle = 1,1,100

 

[meet_use_no_fight]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = states\meet\meet_use_no_fight_

shuffle = rnd

idle = 2,2,100

 

[meet_use_no_weapon]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = states\meet\meet_use_no_weapon_

shuffle = rnd

idle = 5,7,100

 

[meet_use_no_talk_leader]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = states\meet\meet_use_no_talk_leader_

shuffle = rnd

idle = 5,7,100

 

 

[corpse_loot_begin]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = states\loot\loot_begin_

shuffle = rnd

idle = 10,11,100

 

[corpse_loot_good]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = states\loot\loot_good_

shuffle = rnd

idle = 10,11,100

 

[corpse_loot_bad]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = states\loot\loot_bad_

shuffle = rnd

idle = 10,11,100

 

[help_heavy]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, clear_sky

npc_prefix = true

path = help\wounded_heavy\help_

shuffle = rnd

idle = 4,8,100

 

[help_thanks]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, killer, clear_sky

npc_prefix = true

path = help\wounded_thanx\thanx_

shuffle = rnd

idle = 1,1,100

 

[wounded_medkit]

type = npc

avail_communities = army, stalker, bandit, dolg, freedom, killer, monolith, clear_sky

npc_prefix = true

path = help\wounded\medkit_

shuffle = rnd

idle = 1,1,100

 

[post_combat_wait]

type = npc

actor_stereo = false

npc_prefix = true

group_snd = true

path = fight\post_combat_wait\wait_

avail_communities = stalker, bandit, dolg, freedom, army, clear_sky

shuffle = rnd

idle = 3,5,100

 

[post_combat_wait_long]

type = npc

actor_stereo = false

npc_prefix = true

group_snd = true

path = fight\post_combat_wait\wait_

avail_communities = stalker, bandit, dolg, freedom, army, clear_sky

shuffle = rnd

idle = 7,10,100

 

[post_combat_relax]

type = npc

actor_stereo = false

npc_prefix = true

group_snd = true

path = fight\post_combat_wait\relax_

avail_communities = stalker, bandit, dolg, freedom, army, clear_sky

shuffle = rnd

idle = 1,1,100

 

[wait]

type = npc

avail_communities = stalker, bandit, dolg, freedom, army, monolith, clear_sky

npc_prefix = true

path = states\idle\idle_

shuffle = rnd

idle = 7,10,100

 

 

 

Читаем шапку:

6. ПОЖАЛУЙСТА! Указывайте, для какой игры Вам необходима информация (ТЧ, ЧН, ЗП), если стоит мод - укажите название мода;
--/ Artos

 

Добавлено через 43 мин.:

Artos, ЗП.

Модов нет.

Изменено пользователем Artos

Поделиться этим сообщением


Ссылка на сообщение

Дополню вопрос про сталкеров, сидящих у костра:

поправил кое-чего:

сталкеры теперь разговаривают.

Но всё равно не играют на гитаре\гармошке...

Помогите пожалуйста.

P.S.: camp_zone присутствует.

Изменено пользователем zoidberg123456789

Поделиться этим сообщением


Ссылка на сообщение

Здравия желаю. Подскажите пожалуйста как при входе в рестриктор поменять погоду? Пытался сделать функцией level.set_weather("indoor"), но в логе пишет:

!Invalid weather name "indoor".

 

Пытался поменять вот так:

Логика:

[logic]
active = sr_idle@in

[sr_idle@in]
on_actor_in_zone = agr_sr_weather_indoor | sr_idle@out %=change_weather()%

[sr_idle@out]
on_actor_not_in_zone = agr_sr_weather_indoor | sr_idle@in

 

Функция:

function change_weather()
level.set_weather("indoor")
end

 

Но следует выше описанный лог. Подскажите, как можно всё-таки изменить погоду при входе в скрипт?

Заранее спасибо.

P.S.: платформа - ЗП.

Изменено пользователем zoidberg123456789

Поделиться этим сообщением


Ссылка на сообщение
  • Недавно просматривали   1 пользователь

×
×
  • Создать...