 |
 |
 |
|
 |
 |
 |
|
 |
 |
|
« Previous 10 events | 1 ... 3 4 5 6 7 8 9 10 11 | Next 10 events »| All Messages |
|
|
12:13:54 7 September 2009 |
|
x_Spartan_x
Whos got the Kokoretsi? (Resident)
 On forum: 07/07/2009
Messages: 1971
|
would this work, an if not, how would i disable certain items, im not really getting crashes, just not working, i havnt tryed this yet.. going now
class "act_grab_item" (action_base)
function act_grab_item:__init (action_name, st) super (nil, action_name) self.st = st end
function act_grab_item:initialize() action_base.initialize(self) local npc=self.object npc:set_item(object.idle,nil) npc:set_movement_type(move.walk) npc:set_mental_state(anim.danger) npc:set_body_state(move.crouch) npc:movement_enabled(true) local gi=getGObject(self.st) npc:set_sight(look.danger,nil,0) self.st.block_search=true if gi then if(IsStalker(gi) or IsMonster(gi)) then self.tt=time_global()+3000 else self.tt=time_global()+1000 utils.send_to_nearest_accessible_vertex(npc,gi:level_vertex_id()) end end self.force=vector():set(0,0,0) end
function act_grab_item:execute() action_base.execute(self) local npc=self.object local gi=getGObject(self.st) if not gi then return end if self.tt<time_global() then if gi and gi arent()==nil then gi:transfer_item(gi,npc) npc:enable_memory_object(gi,false) end clearGObject(self.st) end end
function act_grab_item:finalize() local npc=self.object self.st.block_search=nil npc:set_sight(look.danger,nil,0) trigger_timed(self.st,"tm1" self.st.dest_lvid=nil action_base.finalize(self) end
local nonos=item:section()~="bread" or item:section()~="bread2"
if nonos then
manager:add_action (actid_grab_item, (false))
end
nonos are the code word, for that trigger, the trigger is only thing that should trigger it.
as for your prob, i think you can just add the the Zombi triiger, on the list, exa
local zombi=npc:character_community()=="zombied" or npc:character_community()=="trader" or npc:character_community()=="arena_enemy" or npc:name()=="mil_stalker0012" or npc:name()=="yantar_ecolog_general" or npc:name()=="mil_freedom_member0021"
just add the actaul spawned names or codes from that particalaur area, dont forget the descr and misc\script for names and codes.
you might even have to open all.spawn and get the actual number codes, not sure, i still stuck on disabling items
brb
"DC Beta v0.65.5" & "Patch Build 4".
https://www.gsc-game.com/index.php?t=community&s=forums&s_game_type=xr2&thm_page=1&thm_id=22535&sec_id=21
Steam Group.
http://steamcommunity.com/groups/spartan_11_11
Currently working on
"The Lions Roar v1.0" (TLR v1.0 Estimated 2012).
http://i239.photobucket.com/albums/ff251/Spartan2073/GlobalMap-1.jpg
http://www.youtube.com/watch?v=bsWwmw2-urE&feature=related
|
10:34:46 7 September 2009 |
|
smoq2
Forklift operator (Resident)
 On forum: 09/08/2008
Messages: 2433
|
---QUOTATION--- Nope, 'fraid not
Looks like it's the same line causing problems though, the error I got this time was:
attempt to call method 'hasScriptedTarget' (a nil value) ---END QUOTATION---
Ok, let's try a different method, try this one:
function add_to_binder(object, char_ini, scheme, section, st)
local npc = object
st.disabled_objects = {}
local manager = object:motivation_action_manager()
local zombi = npc:character_community() == "zombied" or npc:character_community() == "trader" or npc:character_community() == "arena_enemy" or npc:name() == "mil_stalker0012" or npc:name() == "yantar_ecolog_general" or npc:name() == "mil_freedom_member0021"
local board = sim_board.get_sim_board()
local scripted = false
if board ~= nil and board.squads ~= nil then
for i,squad in pairs(board.squads) do
for a,checked_npc in pairs(squad.squad_npc) do
if checked_npc:name() == npc:name() then
if squad:hasScriptedTarget() then
scripted = true
end
end
end
end
end
local prop_idlecombat = xr_evaluators_id.state_mgr + 3
local prop_contact = xr_evaluators_id.stohe_meet_base + 1
if npc:story_id()~=4294967296 or zombi or scripted or (board.squads == nil) then
Revert to the original version of the file and then add the changes. Let's hope it works this time.
The page you need in the public telephone booth will always be missing.
The pendulum spins clockwise...
Current project:
S.T.A.L.K.E.R: The Faction War
https://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr2&thm_id=22757&page=1&sec_id=22&sort=ASC&no_transl=#307619
|
|
« Previous 10 events | 1 ... 3 4 5 6 7 8 9 10 11 | Next 10 events »| All Messages |
|
|
|
» » |
|
All short dates are in Month-Day-Year format. |
 |
|
 |
|
|
|
 |
 |
 |