ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
How to check whether weapon has built-in scope

« Previous 10 events | 1 2 3 4 | All Messages
Posted by/on
Question/AnswerMake Oldest Up Sort by Ascending
  16:56:09  1 February 2012
profilee-mailreply Message URLTo the Top
ket
Senior Resident
 

 
On forum: 01/13/2006
Messages: 1432
What exactly are you trying to do? Just create a exception list?
  16:33:38  1 February 2012
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
 

Message edited by:
Meltac
02/01/2012 16:34:04
Messages: 1519

---QUOTATION---
Weapons that can have scopes fitted/removed;

AK74
Abakan
Groza
LR300
Sig550
Gauss (I think)
L85 (I think)
AS Val

---END QUOTATION---



Thanks, but I think you both got me wrong. What I want is a script that tells me if a weapon (e.g. the actor's current item) has a fixed scope, not an attachable one.


---QUOTATION---
While there are some other scoped weapons like the SVD/SVU, their scopes are not removable AFAIK.
---END QUOTATION---



Exactly those weapons I want to identify by script. And generally, i.e. not only for vanilla weapons (which could be simply listed) but also for unspecified additional ones from any mod.

Something like

if scope_type(weapon) == 0 then
   ... -- no scope at all
elseif  scope_type(weapon) == 1 then
   ... -- built-in scope, e.g. SVD, SVU, G36, FN2000
elseif  scope_type(weapon) == 2 then
   ... -- attachable scope, e.g. AK74, Abakan, Groza
end

  16:04:43  1 February 2012
profilee-mailreply Message URLTo the Top
Lijenstina
Doom metal in the shade of the flying radiators
(Resident)

 

 
On forum: 07/23/2005
Messages: 1902
Check Bak's AI pack.

rx_utils.script the function is addon_attached.
  15:54:10  1 February 2012
profilee-mailreply Message URLTo the Top
ket
Senior Resident
 

 
On forum: 01/13/2006
Messages: 1432
Weapons that can have scopes fitted/removed;

AK74
Abakan
Groza
LR300
Sig550
Gauss (I think)
L85 (I think)
AS Val

While there are some other scoped weapons like the SVD/SVU, their scopes are not removable AFAIK. Set the paramater so the scope can be removed and the game will simply crash
  15:40:42  1 February 2012
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519
How to check whether weapon has built-in scope

Hi modders,

I did this years ago but entirely forgot how to check by script if a given weapon has a scope built-in (status flag 1 in .ltx). And unfortunately my personal wiki somehow got wrecked...

So what would be the easiest to do this by some script 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-2020 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.