ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Question about particles and bind_stalker

1 2 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  21:57:04  23 January 2013
profilee-mailreply Message URLTo the Top
exostalker
Novice fashion designer since 2008
(Resident)

 

 
On forum: 08/10/2009
 

Message edited by:
exostalker
01/23/2013 21:57:42
Messages: 1267
Question about particles and bind_stalker


weather_types={
  l01_escape=0,
  l02_garbage=0,
  l03_agroprom=0,
	l03u_agr_underground=1,
  l04_darkvalley=0,
	l04u_labx18=1,
  l05_bar=1,
  l06_rostok=0,
  l07_military=0,
  l08_yantar=0,
	l08u_brainlab=1,
  l10_radar=0,
	l10u_bunker=1,
  l11_pripyat=0,
  l12_stancia=0,
	l12_stancia_2=0,
	l12u_control_monolith=2,
	l12u_sarcofag=2
}

snow_times={
	{10,11},
	{12,14}
}


	if weather_types[level.name()]==0 then
		if not self.particles then
			self.particles=particles_object("particle_paradise\\real_snow")
			self.particles:play_at_pos( db.actor:position() )
		end
		
		if self.particles then
			self.particles:move_to(db.actor:position(),vector():set(0,0,0))
		end
		
		local hour = level.get_time_hours()
		local need_play = false
		for k,v in pairs(snow_times) do
			if(hour>=v[1] and hour<v[2]) then 
				need_play = true
			end
		end
		
		if need_play==true then
			if self.particles and not self.particles:playing() then
				self.particles:play()
			end
		else
			if self.particles and self.particles:playing() then
				self.particles:stop_deffered()

	rdp.rdp_update()

			end
		end
	end




This is from bind_stalker file, and as you can see the particle (snow) shows up during the certain hours of day. Now would it be possible to change it so it shows up during the certain weather cycles (let's say, storm_weather_12 and cloudy_dark_rain_weather_12)?
  22:59:10  23 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
dont have vanilla files at hand but I think there is function get_weather()
So instead of checking the time just check the weather.
  23:39:44  23 January 2013
profilee-mailreply Message URLTo the Top
exostalker
Novice fashion designer since 2008
(Resident)

 

 
On forum: 08/10/2009
Messages: 1267
I'm not really good at this, so I might need more help with it, as I'm not a programmer:


snow_times={
cloudy_dark_rain_weather_07_00,
cloudy_light_rain_weather_07_00,
cloudy_light_weather_07_00,
cloudy_dark_weather_07_00, 
clear_weather_07_00
	
}


	if weather_types[level.name()]==0 then
		if not self.particles then
			self.particles=particles_object("particle_paradise\\real_snow")
			self.particles:play_at_pos( db.actor:position() )
		end
		
		if self.particles then
			self.particles:move_to(db.actor:position(),vector():set(0,0,0))
		end
		
		local hour = level.get_weather()
		local need_play = false
		for k (snow_times) do
			if(weather=snow_times) then 
				need_play = true
			end
		end
		
		if need_play==true then
			if self.particles and not self.particles:playing() then
				self.particles:play()
			end
		else
			if self.particles and self.particles:playing() then
				self.particles:stop_deffered()

			end
		end
	end




This is just my guess on how it would be, it doesn't crash but it doesn't work either.
  03:50:30  24 January 2013
profilee-mailreply Message URLTo the Top
Alundaio
Sad Clown
(Resident)

 

 
On forum: 04/05/2010
 

Message edited by:
Alundaio
01/24/2013 4:07:25
Messages: 2230

local snow_weather ={
	["cloudy_dark_rain_weather"] 	= true,
	["cloudy_light_rain_weather"] 	= true,
	["cloudy_light_weather"] 		= true,
	["cloudy_dark_weather"] 		= true,
	["clear_weather"] 				= true
}


	if weather_types[level.name()]==0 then
		if not self.particles then
			self.particles=particles_object("particle_paradise\\real_snow")
			self.particles:play_at_pos( db.actor:position() )
		end

		self.particles:move_to(db.actor:position(),vector():set(0,0,0))

		if snow_weather[level.get_weather()] then
			if not self.particles:playing() then
				self.particles:play()
			end
			return
		end

		if self.particles:playing() then
			self.particles:stop_deffered()
		end
	end

  07:33:47  24 January 2013
profilee-mailreply Message URLTo the Top
Daemonion
All About Audio
(Resident)

 

 
On forum: 09/27/2011
Messages: 567
What are the snow particles? Is this in vanilla or a mod?
  07:41:03  24 January 2013
profilee-mailreply Message URLTo the Top
Alundaio
Sad Clown
(Resident)

 

 
On forum: 04/05/2010
Messages: 2230
Particle Paradise.
  13:37:05  24 January 2013
profilee-mailreply Message URLTo the Top
exostalker
Novice fashion designer since 2008
(Resident)

 

 
On forum: 08/10/2009
 

Message edited by:
exostalker
01/24/2013 13:41:43
Messages: 1267
Thanks, but it seems it's not working like it's supposed to, there is almost always 1-5 snow flakes spawned, and that's it...


local snow_weather ={
	["sect_cloudy_dark_weather"] 	= true,
	["sect_storm_weather"] 	= true,
	["sect_cloudy_light_weather"] 		= true,
	["sect_cloudy_dark_rain_weather"] 		= true,
	["sect_clear_weather"] 				= true
}



I have tried a lot of combinations of the weather names...

What would be the names that I would use here, let's say, for vanilla stalker?
I'm probably using the wrong names



---QUOTATION---

What are the snow particles? Is this in vanilla or a mod?

---END QUOTATION---



I took this out from nature winter russian mod, but it seems it was from particle paradise anyways
  20:44:45  24 January 2013
profilee-mailreply Message URLTo the Top
Alundaio
Sad Clown
(Resident)

 

 
On forum: 04/05/2010
Messages: 2230
configs\evironment\weathers\*.ltx


Those are the names of the weathers.
  22:54:15  24 January 2013
profilee-mailreply Message URLTo the Top
exostalker
Novice fashion designer since 2008
(Resident)

 

 
On forum: 08/10/2009
 

Message edited by:
exostalker
01/24/2013 22:55:49
Messages: 1267
Well I tried using those at least a dozen times, it didn't work... something wrong with script probably...

Why did you remove for cycle? From what I know from a little bit of programming lessons, for is a cycle to keep cheking, and if you remove it and only leave if's maybe that's why it doesn't work?

That is just a guess, I really have no idea

It spawns a few snow flakes once you start a game/load game and that is it...

It doess not seem to be affected by weather names, I can write any nonsense and it will still spawn a few snowflakes, so it's probably something else wrong
  01:30:39  25 January 2013
profilee-mailreply Message URLTo the Top
Alundaio
Sad Clown
(Resident)

 

 
On forum: 04/05/2010
Messages: 2230
I turned it into a table. You don't need a for loop.



snow_weather[level.get_weather()]



Is more practical then


	for k,v in pairs(snow_weather) do
		if (k == level.get_weather()) then
		
		end
	end





Where do you have this function? Is it in the bind_stalker:update() function?
 
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.