Меню сайта
HardLife addon
Статистика
Вход

Последнее в блоге
[02.10.2015]
О релизе в steam (14)
[17.06.2015]
Как всё начиналось (3)
Последние картинки
Понедельник, 29.04.2024, 07:01
Приветствую Вас Гость

Квестинг - Страница 2 - Форум

[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 2 из 3
  • «
  • 1
  • 2
  • 3
  • »
Форум » Модификации » Наука модификации » Квестинг (вопросы.)
Квестинг
VorotДата: Среда, 30.03.2011, 00:18 | Сообщение # 16
Поручик
Группа: Модераторы
Сообщений: 2806
Репутация: 112
Статус: Offline
Quote (R@S)
I have tested this and it works

Yes, I did it too. Thanks You twice. )))

1. If the protagonist is killed, we ask player: want to continue playing or start new game? Then all of its equipment consists of a virtual safe. Mercenaries dissolved in usual sectors. The contracts are broken. Skipping a long period of time depending on the wound. Jobs fails. Player can continue game.

2. How can I verify that the team only two person of opposite-sex?


"Они хотели нас похоронить, но не знали, что мы семена" (мексиканская пословица)

Сообщение отредактировал Vorot - Среда, 30.03.2011, 01:43
 
R@SДата: Среда, 30.03.2011, 01:27 | Сообщение # 17
Лейтенант
Группа: Пользователи
Сообщений: 54
Репутация: 17
Статус: Offline
OK, I figured out how to resurrect the player after he is killed, here's the code that does that and removes all the mercs from the team:

replace Player.OnKilled by
phrase OnKilled_Mod()
local i
local TmpHP
local ref TmpRef
local ref TmpSec
local string CurrentSectorName
local ref TmpSector

CurrentSectorName = call GetCurrentSectorName()

for (i = 1, i<=AllSectors SIZE, i++)
TmpSec = AllSectors Get(i)
if (CurrentSectorName==TmpSec.Name)
TmpSector=TmpSec
end if
end for

for (i = 1, i<=Player.MyTeam SIZE, i++)
TmpRef = Player.MyTeam Get(i)
Player.DelFromTeam(TmpRef)
end for

TmpHP = call GetHealth(Player.LocalID)
call SetHealth(Player.LocalID, TmpHP)
call ForceUnloadSector(TmpSector)

callm StratAI.SkipTime(1, 0)
Player.SetLocationInSector("exit place")
call ForceLoadSector(TmpSector)
end phrase

EDIT: I tested this again and it doesn't work. It seems the player gets unregistered when killed and there is no way to avoid that. Maybe try to get the dialog option before the player actually dies would be a better way to do it.

You can change the time he's out of action by altering the SkipTime(9 function and set what sector he will restart at.

You can add the dialog option here too so the player can choose what to do. But it's getting late and I have an early morning tomorrow and I need my beauty sleep smile

I'm so tired I'm not sure what you mean by opposite-sex persons, do you mean 2 women on the team or 2 men and 2 women? As I said, I'm too tired to figure that out tongue

EDIT: I think I understand better what you mean, now that I have rested. You want a check to see if the player team is 1 man and 1 woman, and here's the syntax for that check.

local i
local string TmpSex
local ref TmpRef

if (Player.MyTeam SIZE==1)

for (i = 1, i<=Player.MyTeam SIZE, i++)
TmpRef = Player.MyTeam Get(i)
TmpSex = call GetSexByID(TmpRef.LocalID)
end for

if (Player.Sex==Male AND TmpSex==Female OR Player.Sex==Female AND TmpSex==Male)
//Do what you want happening if this is true
end if
end if

Have fun

Сообщение отредактировал R@S - Среда, 30.03.2011, 12:51
 
VorotДата: Четверг, 31.03.2011, 00:23 | Сообщение # 18
Поручик
Группа: Модераторы
Сообщений: 2806
Репутация: 112
Статус: Offline
2R@S

Thanks for "Couple test" code... I have not errors only if put exaples with vhp&TestObj into QuestRoom.

In example of using Item. Tell me please. How can I identify that the subject enjoys someone other than the protagonist and who is. And how to increase resourse on it that object, which is used.


"Они хотели нас похоронить, но не знали, что мы семена" (мексиканская пословица)

Сообщение отредактировал Vorot - Четверг, 31.03.2011, 00:25
 
R@SДата: Четверг, 31.03.2011, 01:39 | Сообщение # 19
Лейтенант
Группа: Пользователи
Сообщений: 54
Репутация: 17
Статус: Offline
OK, here's the code that includes a check to see if it's the player or another merc that uses the item:

def object TestObject
begin

phrase Test()
local i
local ref TmpRef
local String TmpRefID = call GetCurrentMerc()

if(EventParmStr==Test_Item AND TmpRefID>0)

for(i=1, i<=Player.MyTeam SIZE, i++)
TmpRef = Player.MyTeam get(i)
if(TmpRefID==TmpRef.LocalID)
TmpRef.Say(""+str(TmpRef.DisplayName)+"")//Here you put the functions for the merc
end if
end for

else

if(EventParmStr==Test_Item AND TmpRefID==0)
callm vhp.InitValueHandler("Player")
if(callm vhp.pt("Actor")=="049_Kim")
Player.Say("Kim")//Here you put your functions or events here
else
if(callm vhp.pt("Actor")=="285_jaguar")
Player.Say("Gabriel")
else
if(callm vhp.pt("Actor")=="046_AlekseyIvanov")
Player.Say("Ivanov")
else
if(callm vhp.pt("Actor")=="047_Kurt")
Player.Say("Kurt")
else
if(callm vhp.pt("Actor")=="045_Cameron")
Player.Say("Cameron")
else
if(callm vhp.pt("Actor")=="048_Lambert")
Player.Say("Lambert")
else
if(callm vhp.pt("Actor")=="286_hope")
Player.Say("Christine")
else
if(callm vhp.pt("Actor")=="050_Babu")
Player.Say("Sanjay")
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end phrase

INITIAL
on event "USE Item" callm TestObject.Test() ALWAYS
END INITIAL
end

What do you mean by "how to increase resourse on it that object". Do you mean repairing it like you can do with weapons? Or do you mean change it's behavior and what it does?

 
VorotДата: Четверг, 31.03.2011, 01:50 | Сообщение # 20
Поручик
Группа: Модераторы
Сообщений: 2806
Репутация: 112
Статус: Offline
Quote (R@S)
Do you mean repairing it like you can do with weapons?
Yes I do.


"Они хотели нас похоронить, но не знали, что мы семена" (мексиканская пословица)
 
R@SДата: Четверг, 31.03.2011, 01:57 | Сообщение # 21
Лейтенант
Группа: Пользователи
Сообщений: 54
Репутация: 17
Статус: Offline
I don't think there is such a function, but you can make it by magic, or an illusion biggrin

Like

Player.DelItem(Test_Item)
Player.AddItem(Test_Item)

or if it's the merc

TmpRef.DelItem(Test_Item)
TmpRef.AddItem(Test_Item)

Then you'll have an item that is as good as new

 
VorotДата: Четверг, 31.03.2011, 02:06 | Сообщение # 22
Поручик
Группа: Модераторы
Сообщений: 2806
Репутация: 112
Статус: Offline
2R@S
Thanks for a great guru. Your lessons are very useful to me. hands
))))))))))))))))))))))))))))))))))


"Они хотели нас похоронить, но не знали, что мы семена" (мексиканская пословица)
 
R@SДата: Четверг, 31.03.2011, 02:11 | Сообщение # 23
Лейтенант
Группа: Пользователи
Сообщений: 54
Репутация: 17
Статус: Offline
I'm glad I can help, and it is really Deadhead that deserves all the credit. He has taught me everything I know about this and was generous enough to spend a lot of time answering my questions.
 
VorotДата: Четверг, 31.03.2011, 18:53 | Сообщение # 24
Поручик
Группа: Модераторы
Сообщений: 2806
Репутация: 112
Статус: Offline
I'm shocked, what worked yesterday, today, leads to the collapse. After the entering main program loop. ((((((((((((((((((((((((((((((((((((((((((((

"Они хотели нас похоронить, но не знали, что мы семена" (мексиканская пословица)

Сообщение отредактировал Vorot - Суббота, 02.04.2011, 16:40
 
R@SДата: Четверг, 31.03.2011, 20:17 | Сообщение # 25
Лейтенант
Группа: Пользователи
Сообщений: 54
Репутация: 17
Статус: Offline
If you want I can try and take a look at it, I have HLA installed and could easily check it. But since google translate is difficult to use when sending a private message, send me one first and I'll reply with my mail address included.

Or maybe you can just get my mail address from my user profile? smile

Сообщение отредактировал R@S - Четверг, 31.03.2011, 20:24
 
VorotДата: Суббота, 02.04.2011, 13:56 | Сообщение # 26
Поручик
Группа: Модераторы
Сообщений: 2806
Репутация: 112
Статус: Offline
Как выгрузить игрока из сектора насильно? Пробую использовать callm ForceUnloadSector(ForestCamp), дает syntax error...

"Они хотели нас похоронить, но не знали, что мы семена" (мексиканская пословица)
 
R@SДата: Суббота, 02.04.2011, 16:06 | Сообщение # 27
Лейтенант
Группа: Пользователи
Сообщений: 54
Репутация: 17
Статус: Offline
call ForceUnloadSector(ForestCamp)

Сообщение отредактировал R@S - Суббота, 02.04.2011, 16:07
 
ЮрГДата: Суббота, 02.04.2011, 16:28 | Сообщение # 28
Полковник
Группа: Друзья
Сообщений: 181
Репутация: 9
Статус: Offline
www.translate.ru - good

translate.google.ru - poor

 
VorotДата: Пятница, 22.04.2011, 20:04 | Сообщение # 29
Поручик
Группа: Модераторы
Сообщений: 2806
Репутация: 112
Статус: Offline
1. Как убрать все предметы с земли в виртуальный сейф помощи квестовой системы?
- пропадают же предметы с земли со временем, есть же "убрать все в багажник", в квесте с убийством мэра земля чистится (хотя там пожалуй просто трупу другой сектор назначают)...
ответ: пока никак

2. Как убирать квест из текущих в выполненные?
ответ: установить статус в выполненные, потом что-нибудь записать в журнал про этот квест.

3. Характеристика механики HardLife, это какая-то неиспользуемая в оригинале или отдельно хранимая величина?
ответ: отдельно хранимая величина

2 DoRaDo

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

def Object MyNPC
begin

// здесь описание персонажа если новый...
end

ROOM QuestRoom
def Object Quest

begin

phrase EnterToSector()

MyNPC.SetSector(Sector, "место NPC")
// call SetToPlace (MyNPC.ININame, "место NPC")// SetToPlace это если нужно мгновенно установить в его точку.
// Sector = Campesino или любой какой нужно
// "место NPC" должно быть указано в файле мест.
Throw 'Вошел в сектор'
end phrase

initial

on event "Ч-з 2 ч войти" then TIMER2+2 call Quest.EnterToSector()
delete when 'Вошел в сектор'

end initial
end
end room

где нибудь должно кидаться событие "Ч-з 2 ч войти" и MyNPC должен быть описан.


"Они хотели нас похоронить, но не знали, что мы семена" (мексиканская пословица)

Сообщение отредактировал Vorot - Пятница, 22.04.2011, 20:14
 
DoRaDoДата: Пятница, 22.04.2011, 20:29 | Сообщение # 30
Лейтенант
Группа: Пользователи
Сообщений: 72
Репутация: 0
Статус: Offline
ясно спс

Улыбнись ! Сейчас тебя снимет дядя-снайпер...

 
Форум » Модификации » Наука модификации » Квестинг (вопросы.)
  • Страница 2 из 3
  • «
  • 1
  • 2
  • 3
  • »
Поиск: