ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Some questions about task creating

1 2 3 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  15:58:18  8 January 2013
profilee-mailreply Message URLTo the Top
The Xenus
(Senior)
 
On forum: 03/09/2011
Messages: 144
Some questions about task creating

I have made some new tasks for shoc and now i have some questions :

1. How i can make a mapspot for a special task npc, spawned by script ?

2. How i can make it that a mission is completed when the player has eliminate all stalkers in a smart_terrain ?

For the moment thats all
  00:48:29  9 January 2013
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
 

Message edited by:
Vintar
01/09/2013 0:48:57
Messages: 6349

---QUOTATION---
Some questions about task creating

I have made some new tasks for shoc and now i have some questions :
1. How i can make a mapspot for a special task npc, spawned by script ?
---END QUOTATION---


local s_obj = alife():create(my_dude)
level.map_add_object_spot(s_obj.id, "green_location", "my_hint")




---QUOTATION---
2. How i can make it that a mission is completed when the player has eliminate all stalkers in a smart_terrain ?
---END QUOTATION---



I dont have vanilla files infront of me, but if you check xr_gulag.script, there should be a function summin like get_gulag_population(gulag), so you would say something like
if xr_gulag.get_gulag_population("my_gulag_name") == 0 then
     --all are dead
end

  11:19:54  9 January 2013
profilee-mailreply Message URLTo the Top
The Xenus
(Senior)
 
On forum: 03/09/2011
Messages: 144

---QUOTATION---
if xr_gulag.get_gulag_population("my_gulag_name" == 0 then
--all are dead
end
---END QUOTATION---



And this function i write in a separate scriptfile ?
  18:53:02  9 January 2013
profilee-mailreply Message URLTo the Top
The Xenus
(Senior)
 
On forum: 03/09/2011
Messages: 144
Okay i would like to know another

How i can make it that when the gulag is clear from npc, a ingame message popup(with icon, sender name and text) ?
(maybe a example with both fuctions in one script ? )
  23:20:26  9 January 2013
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
Messages: 6349

---QUOTATION---
Okay i would like to know another

How i can make it that when the gulag is clear from npc, a ingame message popup(with icon, sender name and text) ?
(maybe a example with both fuctions in one script ? )
---END QUOTATION---



Function check_and_report()
     if xr_gulag.get_gulag_population("my_gulag_name") == 0 then
          news_manager.send_tip_hud(header, text, sender, time, sound)  
     end
end



again, I dont have the vanilla files at hand, so just check that news_manager function name and params.
  12:12:10  16 January 2013
profilee-mailreply Message URLTo the Top
The Xenus
(Senior)
 
On forum: 03/09/2011
Messages: 144
Okay i have try it out and it works. The problem is that the textmessage not stops and always repeated. How can i stop this and made it that the message only one time showed up ?

Here is the script i use:


 function check_escape_event_1()
     if xr_gulag.getGulagPopulation("esc_bridge") == 0 then
        actor:give_info_portion("esc_blockpost_leader_dead")
     end
end

function check_escape_event_1_1()
	if has_alife_info("esc_blockpost_leader_dead") then
          news_manager.send_tip( db.actor, "tips_esc_soldier_sos", nil, "soldier", nil ) 
	end
end 

  18:43:51  20 January 2013
profilee-mailreply Message URLTo the Top
The Xenus
(Senior)
 
On forum: 03/09/2011
 

Message edited by:
The Xenus
01/20/2013 18:44:11
Messages: 144

local s_obj = alife():create(my_dude)
level.map_add_object_spot(s_obj.id, "green_location", "my_hint")



This function don`t work for me


I use this to spawn an npc and give him a mapspot.


create("esc_sids_courier",27.173040390015,1.1927669048309,24.741792678833,306643,90)
level_tasks.add_location(esc_sids_courier, "green_location", "esc_sids_courier")



But the npc is not mark when i start my task and he should be marked on the map.

Anyone knows how i can give my script spawned npc an mapspot for tasks ?
  23:25:31  20 January 2013
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
Messages: 6349

alife():create("esc_sids_courier", vector():set(27.173040390015,1.1927669048309,24.741792678833), 306643,90)



Like that.
  12:30:12  21 January 2013
profilee-mailreply Message URLTo the Top
The Xenus
(Senior)
 
On forum: 03/09/2011
Messages: 144

---QUOTATION---

alife():create("esc_sids_courier", vector():set(27.173040390015,1.1927669048309,24.741792678833), 306643,90)



Like that.
---END QUOTATION---



Yes the npc spawn, after i activate the task. And the spot is too see on the map. But the spot is on the wrong position

Here is a screen:
[link]http://s7.directupload.net/file/d/3142/z6sicyti_jpg.htm[/link]
  14:10:32  21 January 2013
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
Messages: 6349
Because you are adding th location where you spawn your guy but he has no logic aand walks away. You must add map spot to his id.
 
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.