Results 1 to 1 of 1
  1. #1
    stabalot's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0

    spawning civilians?

    hi guys, i'm working on a payday2 fun mod which i will share here when it's completed
    and trying to spawn civilians / gangmembers

    but everytime i do the game crashes,
    spawning normal enemies works fine though.

    The code for one of spawning functions is:

    Code:
    function spawn_crackwhore(position, rotation)
    	local unit_name = Idstring( "units/payday2/characters/civ_female_crackwhore_1/civ_female_crackwhore_1" )
    	local spawn_ai = { init_state = "idle" }
    	local unit = World:spawn_unit( unit_name, position, rotation )
    	unit:movement():set_character_anim_variables()
    	unit:brain():set_spawn_ai( spawn_ai )
    	unit:brain():set_active( true )
    end
    it will crash the game whenever it's spawned. the same happens with other civilians
    as well as bikers / gangmembers.

    I've looked at the game's sourcecode but can't find anything about spawning civilians or gangmembers
    i think this is coded in the maps.

    Anyway i was wondering if any of you guys had any luck with spawning civs / gangmembers
    and could please share with me the proper way to do it.

    the original code i used for spawning enemies had a line in it like:
    unit:base().tazer_1 = true

    after spawning, my guess is that there must be a base set in the code for civilians and gangmembers
    or somehow they must be set to have a different brain, but i can't find what it is i've tried dozens of things without any luck.

    and i was also wondering if anyone here knew how to send a text message on screen to all the players.

    Code:
    if managers.hud then
    					managers.hud:show_hint( { text = "text message" } )
    				end
    this code will only show the onscreen text to me, the host but i want to display a text for all players to see.

    any help would be appreciated


    thanks
    Last edited by stabalot; 10-15-2013 at 09:46 AM.

Similar Threads

  1. How to may spawn on all bases
    By Naeron in forum WarRock - International Hacks
    Replies: 8
    Last Post: 05-13-2007, 07:44 PM
  2. [Trade]Insta Spawn & Unlim Stamina Adresses for....
    By EndRiT in forum WarRock - International Hacks
    Replies: 4
    Last Post: 04-15-2007, 06:57 AM
  3. [request]spawn kill
    By MaskedFox in forum WarRock - International Hacks
    Replies: 9
    Last Post: 03-20-2007, 09:21 PM
  4. Spawn on enemy base
    By analog70 in forum WarRock - International Hacks
    Replies: 36
    Last Post: 03-18-2007, 04:17 AM
  5. [RELEASE] Xauen Sniper Spawn
    By retrac in forum WarRock - International Hacks
    Replies: 4
    Last Post: 02-19-2007, 04:05 PM