ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Saving Coords To Console Issue

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  14:35:06  11 February 2019
profilee-mailreply Message URLTo the Top
insanelazarez
Yeah, Good Luck With That...
(Resident)

 

 
On forum: 01/31/2009
Messages: 1033
Saving Coords To Console Issue




Hello guys, i have a stupid issue in my function. The idea is to create a ecologist npc, triggered by a stalker under script control (on a smart terrain).

So my functional npc is moving on a custom path and his logic is something like this:

on_info5 = {=ts(3.8} %=npc_save_walk_and_look_data%

The function {=ts(3.8)} is a custom xr_condition that allows me to reset and repeat when the time value is reached (in this case 3.8 seconds).
This was made this way to prevent an overwhelming timer spam, this is not a problem... it works fine.
So as you can see, after 3.8 seconds a xr_effects function is executed. Function name is 'npc_save_walk_and_look_data'

And the function is:


-- Function starts Here

function npc_save_walk_and_look_data(actor, npc)

 if npc then

        local distance = 5 -- this is the distance from npc himself -- in front of the npc

		local position = npc:position()
		local direction = npc:direction()

	local noobposition = npc:position()

	local nmpos = vector():set( noobposition.x + (distance * direction.x * (1)), noobposition.y + (distance * direction.y * (1)), noobposition.z + (distance * direction.z * (1)))

             for i = 1, 1 do

    local reality = alife():create(faction_ecolog[math.random(1,4)], nmpos, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
--------------------------------------------------------------------

-- The ecologist stalkers created are spawning exactlly where i want (in front of my custom npc, separated by 5 metters)
-- Everything is good, BUT...

-- now i need to save 2 things to console:
-- 1st thing -- Current Position Of Npc under script control himself + lvid and gvid (this is not a big deal because, the custom npc is already under my control... i know where he goes)
-- 2st thing -- Current Position Of Created Ecologist + lvid and gvid -- this will match the coordenates of the created ecologist (this is the issue)

--	get_console():execute(1st thing)
--	get_console():execute(2st thing)

--------------------------------------------------------------------

             end

 end
end

-- Function Ends Here


Ok, guys this is hard for me ... but for some of you guys this is a walk in the park

Thanks in advance



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