Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Thread located in: 'http://www.gsc-game.com/main.php?t=community&s=forums&s_game_type=xr&thm_page=1&thm_id=21607&page=2&sort=ASC&sec_id=16#362081'
- ;Created by 'Insanelazarez' in July, 7, 2012
- ;NPC for DutyStalker666 [GSC - Forum] - [quick fix, not tested]
- ; Please read EVERYTHING IN THIS FILE, ok?
- ;You might consider a new position close of the fox position.
- ;Use '_g.script' fix. Open it ... line 20... comment the line 20 ONLY, this way '-- log(string.format(fmt,...))'
- ;Trust me you need that fix, cause you are working with the AI. IF you dont change it... YOU WILL DESPERATE.
- ;Let's tell the game he shall NOT use the loadout form his profile (assuming he spawns by script ONLY)
- [dont_spawn_character_supplies]
- ;Done. So he has no loadout, right? But now you can customize his loadout (AGAIN... assuming he spawns by script ONLY)
- [spawn]
- wpn_pb
- ammo_9x18_fmj = 7
- wpn_vintorez;LOL
- ammo_9x39_pab9 = 7
- medkit_scientic = 3
- medkit_army = 3
- medkit = 3
- device_torch
- grenade_f1 = 2
- guitar_a;;;;;later he might use it in the 'Kamp' Module.
- ;add other items to use in 'kamp' mode later if you want.
- ;The next is just sad. Pretty soon the game is going to call him for some smart terrain, no matter what. Remmeber at this point i assume you killed the carpark bandits, right? Therefore the number of kamps increases.
- ;Sooner or later that is going to happen. In special because you are spawning by script.
- [smart_terrains]
- none = true
- ;Logic 'introduction module' start here:
- [logic]
- active = camper@start
- meet = meet
- combat_ignore = if_this_section_is_present_it_means_you_can_customize_it
- on_death = this_is_what_happens_when_he_dies;;this section is present in the end of this file. Keep it.
- [if_this_section_is_present_it_means_you_can_customize_it]
- ;THIS IS USED THIS WAY... LITERALLY.
- ;WHEN I SAY 'CUSTOMIZE'... I MEAN IN THE NEXT MODULES YOU CAN CALL IT WITH THE CODE: 'combat_ignore_cond ='
- ;In your code the walk/look paths's names were wrong:
- [camper@start]
- wounded = wounded@test
- path_walk = esc_stalker_camp_esc_wounded_fox_walk;THIS IS CORRECT NOW... use it.
- path_look = esc_stalker_camp_esc_wounded_fox_look;DO THE SAME HERE... just use it.
- def_state_moving = walk
- def_state_standing = guard;This anim is called by the look path itself... KEEP IT.
- def_state_campering_fire = threat
- combat_ignore_cond = {=fighting_actor =fighting_dist_ge(25)};Aha... see? Now we can use this.
- danger = this_is_his_danger_section
- meet = no_meet
- on_info = {+escape_fox_heal} remark@if_fox_is_ok
- on_info2 = {+esc_dogs_return} remark@if_fox_is_dead;IF fox dies... 'esc_dogs_return' is the correct info.
- ;So, in this case fox is alive right? So the new guy is happy.
- ;The next two modules are 'remarks'... Therefore its an 'All Purpose Combat Scheme'. It might be hard to control the new guy... regarding the 'distance to dangers' thing.
- ;But let's try that way...
- [remark@if_fox_is_ok]
- wounded = wounded@test
- no_move = true
- anim = press;USE this one... it's very cool
- target = actor;OR you can replace it by fox id number... '5'. So use 'actor' OR '5'
- snd = story_reac_laughter;That's a 'HAPPY SOUND' kinda...
- combat_ignore_cond = {=fighting_actor =fighting_dist_ge(25)};See? now we can use it again.
- danger = this_is_his_danger_section
- meet = no_meet
- on_signal = sound_end | kamp@last_code
- on_info = {+esc_dogs_return} remark@if_fox_is_dead; Because fox might die, when 'happy sound' is still playing, right?
- ;BUt in this case fox is dead... He needs a 'New' sound...
- [remark@if_fox_is_dead]
- wounded = wounded@test
- no_move = true
- anim = sit_knee
- target = 5; in this case he looks to dead fox
- snd = val_escort_dead;;'Bullet' duty sound in darkvalley when the other duty guy dies.
- combat_ignore_cond = {=fighting_actor =fighting_dist_ge(25)};AGAIN see?
- danger = this_is_his_danger_section
- meet = no_meet
- on_signal = sound_end | kamp@last_code
- ;The two 'All Purpose Combat Schemes' are over.
- ;NOW he must start the final scheme, similar to fox himself. Make sure he has a guitar, right?
- ;The meet state is enabled, but he might not use it at all.
- [kamp@last_code]
- center_point = esc_stalker_camp_esc_fox_kamp;USE THIS PLEASE
- path_walk = esc_stalker_camp_esc_fox_kamp_task;AND THIS
- combat_ignore_cond = {=fighting_actor =fighting_dist_ge(25)};AGAIN see?
- danger = this_is_his_danger_section
- meet = meet;;;IF possible... you might 'use' him, eventually. Depending of the Kamp scheme itself.
- ;This section is very effective in special when he is using 'camper' modules. Like the one used in 'camper@start'
- ;However... The 'guard' animation is strange, but it's the one called by the look path itself. Don't be surprised if he behaves like an asshole. Lol.
- [this_is_his_danger_section]
- ignore_distance = 25
- ignore_types = grenade, hit, corpse, sound
- ignore_distance_grenade = 5
- ignore_distance_corpse = 0.19;Don't worry... this value is ok for distance corpse
- ignore_distance_hit = 150
- ignore_distance_sound = 50
- danger_inertion_time_grenade = 2000
- danger_inertion_time_corpse = 190
- danger_inertion_time_hit = 2000
- danger_inertion_time_sound = 1500
- danger_inertion_time_ricochet = 1000
- [wounded@test]
- hp_state = 30|help_me@help|10|wounded_heavy@help_heavy
- hp_state_see = 30|wounded@help_see|10|wounded_heavy@help_heavy
- psy_state = 50|{=best_pistol}psy_armed,psy_pain@wounded_psy|20| {=best_pistol}psy_shoot,psy_pain@{=best_pistol}wounded_psy_shoot,wounded_psy
- hp_victim = 30|actor|10|nil
- hp_cover = 30|true|10|false
- hp_fight = 30|true|10|false
- syndata = wounded@help
- ;OMG, he died. So... the game plays this sound: 'One is down. This is number two... assuming command'. LOL...
- ;In short the sound is playing by the game engine.
- [this_is_what_happens_when_he_dies]
- on_info = %=play_snd(characters_voice\scenario\military\dolg_attack\base\mil_dolg_down_3)%
- ;The logic file ends here.
- ;IMPORTANT:
- ;1 - DutyStalker666, you might consider spawning him close of the fox position.
- ;2 - Fox has a space restrictor for sure, and if the restrictor is type '2'... The new guy crashes the game when he penetrates the space.
- ;If the restrictor is type '0' or '3', well if that's the case... it's ok.
- ;3 - I suppose you are creating the new guy, with wolf's dialog... or maybe the 'SIDOROVICH trader' Dialog.
- ;Ok, how can i explain this... Spawning the guy with such dialogs is a nice trick... IF we want the guy close of Wolf/or trader positions.
- ;BUT in this case, the guy is in a 'OFF-LINE' Position. The distance between him and you is bigger than 150 metters. It more like 900 metters. Maybe more.
- ;In short, by script he ALWAYS SPAWNS IN A DIFFERENT POSITION. That is not going to change.
- ;So don't be surprised, if sometimes the game crashes. IN SPECIAL IN A LOW-END PC.
- ;4 - If you still want to create him by script, i recommend a function called LATER. Like the one used by the 'trader tip' when you receive the task 'MEET FOX'.
- ;This might help us better, because when the player receives this task... the distance is smaller, see?
- ;5 - BUT DutyStalker666, You should consider to spawn him via all.spawn.
- ;Cause via script, you are going to have problems. Sorry.
- ;6 - The code was NOT TESTED. And it was written by memory (except the 'wounded' section) ... so it might contain some error.
- ;7 - The Code itself was created like in 5 minutes. BUT the commented sections... wow... it was like 90 minutes or something. English is not my language. I'm portuguese, see?
- ;8 - Well, DutyStalker666. Have fun, and tell me something later in the 'GSC-Forum', ok?
- ;9 - These Commented sections just killed me... lol.
- ;10 - That's it... I'm out.
- Insanelazarez,
- Lisbon July, 7, 2012
- Lisboa 7 de Julho, 2012
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement