Civilian hostility change

  1. 8 years ago

    Hey guys!
    As I understand, the hostility option for civilians can change according to player actions, like destroying enemy installations, talking to leaders, or killing civilian population. Is there a function that controls the hostility change? I'm working on a script that would decrease hostility towards BLUFOR when players bring humanitarian aid to civilian populated locations, but I'm not even sure if it's possible without peeking into mod's source code.

  2. While on the subject...

    Possible for the civilians to hate the Assymetric bad guys so much that they arm themselves and kill the insurgents?

  3. @HeroesandvillainsOS  While on the subject...

    Possible for the civilians to hate the Assymetric bad guys so much that they arm themselves and kill the insurgents?

    Yes this is possible.. very entertaining

  4. @Cienias Hey guys!
    As I understand, the hostility option for civilians can change according to player actions, like destroying enemy installations, talking to leaders, or killing civilian population. Is there a function that controls the hostility change? I'm working on a script that would decrease hostility towards BLUFOR when players bring humanitarian aid to civilian populated locations, but I'm not even sure if it's possible without peeking into mod's source code.

    Here is some example code to change civilian hostility in an area, this must be executed on the server to work.

    // Must be executed on server
    [position, sides, value] call ALIVE_fnc_updateSectorHostility;
    Value is a relative increment to existing hostility
    
    // increase hostility at player's position for player's side
    [getPos player, [side player], 20] call ALIVE_fnc_updateSectorHostility;
    
    // decrease hostility at player's position for player's side
    [getPos player, [side player], -20] call ALIVE_fnc_updateSectorHostility;
  5. Thanks mate, works as a charm. ^^

  6. Added that shit to wiki, yo

    http://alivemod.com/wiki/index.php/Insurgency#Editor_Notes

  7. highhead

    20 Apr 2016 Administrator

    you are great guys

  8. Friznit

    20 Apr 2016 Administrator

    I'm a girl

  9. Edited 8 years ago by HeroesandvillainsOS

    @Cienias Hey guys!
    As I understand, the hostility option for civilians can change according to player actions, like destroying enemy installations, talking to leaders, or killing civilian population. Is there a function that controls the hostility change? I'm working on a script that would decrease hostility towards BLUFOR when players bring humanitarian aid to civilian populated locations, but I'm not even sure if it's possible without peeking into mod's source code.

    Could you talk more about the humanitarian aid mechanics you're using (what you're physically bringing to the civilians, how it looks a in game, etc)? Seems like a neat feature the ladies in this thread might like. ;)

  10. That's is a really nice idea. A nice realistic touch.

  11. highhead

    22 Apr 2016 Administrator

    @Friznit then you are a quite ugly girl :)

  12. ^ seconded

  13. Edited 8 years ago by Cienias

    So far I've got triggers positioned on squares or market areas in cities. We have a certain type of trucks in our FOB marked as humanitarian aid trucks. When they arrive in the area of a trigger, a script is being run, which spawn some civilians nearby, orders them to get near the truck idle there for a while (I'm going to add some animation to it), and then just go away and despawn, and we get improved relations in the area. We're unloading crates with ACE's bananas just for roleplay, but I'll try to script it into scenario mechanics in the future. :P

  14. Edited 8 years ago by HeroesandvillainsOS

    Nice. Please when you get it to a place you're happy with, post it back here. That's fantastic. :)

  15. Sure thing, I'll post it as soon as we check it for any bugs ingame. Probably by the end of next week. ;)

  16. Edited 8 years ago by SpyderBlack723

    Neat idea!

    +1 for bananas

  17. Bananas for the world. Sounds great. Thumbs up for sharing, if you do ;)

  18. Is there anything ACE_banana can't do??

  19. Taxes

  20. That sounds really cool! I look forward to checking it out

  21. Newer ›
 

or Sign Up to reply!