Page 8 of 14 FirstFirst ... 678910 ... LastLast
Results 71 to 80 of 135

Thread: MOHAA Coop

  1. #71

    Default

    Quote Originally Posted by 1337Smithy View Post
    Just to let you know that since SH, they've introduced AI bugs in the engine....
    Good to know, I am not there yet, still sorting out the global scripts stuff.
    - Fixed Cardgame Ai having no weapons (related to holster/unholster)
    - Made good advances in friendly. (friendlytype 4)
    - Made some little advances in spotlight (sort of detects multiple players)

    Just out of curiosity, has anyone ever gotten the singleplayer spotlights to work in mp ?
    I am getting there but it may take days or even a week or longer.
    Last edited by chrissstrahl; August 5th, 2018 at 03:05 PM.

  2. #72
    Senior Member Ancient Order's Avatar
    Join Date
    Aug 2015
    Location
    Paris, Fr.
    Posts
    256

    Default

    yes , this one only workk for m1l2a because of the hardcoded path stuff. Instead define your owns with set and group numbers in the map script and pass them to the spotlight2.scr when you call it:
    Code:
    main:
    
    $t720.origin = (2475 1700 -80)
    $t355.origin = (1990 1600 -80)
    $t781.origin = (2545 1160 8)
    $t767.origin = (2496 1152 8)
    $t769.origin = (2340 1136 8)
    $t771.origin = (2144 1184 8)
    $spotpath1_3.origin = ( -26 1960 -80)
    
    	if ($spotlight == NULL)
    		level.spotlights = 0
    		else
    		level.spotlights = $spotlight.size
    
    
    	if (level.spotlights > 0){
    	
    		level.spotlight = exec global/makearray.scr $spotlight
    
    		for (local.i=1;local.i<level.spotlights+1;local.i++){
    		
    			level.spotlight[local.i] thread spotwatch
    
    			if (level.spotlight[local.i].set == NIL){
    			
    				println ("Warning, spotlight at " + level.spotlight[local.i].origin + " has no #set, setting to 1")
    				level.spotlight[local.i].set = 1
    			}
    
    			if (level.spotlight[local.i].group == NIL)
    				println ("Error, spotlight at " + level.spotlight[local.i].origin + " has no #group")
    				else
    				println ("Spawned spotlight " + local.i)
    			}
    			
    		}
    
    end		
    
    //**************************************************************************
    //       Spotlight Controller Script by: Bdbodger  (posted at www.modtheater.com)
    //                 
    //**************************************************************************
    
    spotwatch:
    
    	level waittill spawn
    	local.light = spawn script_model
    	local.light model "fx/dummy.tik"
    	
    	self.spotlight = local.light
    	 
    	local.light light (1.0 1.0 1.0)
    	local.light lightRadius 400
    	local.light lightOn
    	local.light notsolid
    	 
    	self model "miscobj/searchlightbase.tik"
    	self.angles = (0 0 0)
    	self scale 1
    	self notsolid
    	 
    	local.bulb = spawn script_model
    	local.bulb model "miscobj/searchlight.tik"
    	local.bulb scale 1
    	local.bulb.origin = self.origin + (0 0 32)
    	self.bulb = local.bulb
    	
    	local.bulb bind self
    	local.bulb notsolid
    	 
    	local.flare = spawn script_model
    	local.flare model "fx/searchlight.tik"
    	local.flare.origin = self.origin + (64 0 64)
    	self.flare = local.flare
    	    
    	local.flare bind self
    	local.flare notsolid
    	 
    	local.org = spawn script_origin
    	local.org.origin = self.origin
    	self.org = local.org
    	
    	self thread spotpath
    	self thread light_corona
    	self thread aimspot
    	
    end
    
    
    spotpath:
     
    	local.path = $("spotpath" + self.set + "_" + self.group)
    	 
    	while(1){
    	
    		self.org.origin = local.path.origin
    		self.org flypath local.path 250 750 200
    		self.org waitmove
    
    	}
    
    end
    
      
    light_corona:
     
    	while (1){    
    
    		local.org = self.org.origin
    		local.vect1 = (local.org - self.origin)
    		local.vect1 = vector_toangles (local.vect1)
    		local.angles = self.angles
    		local.angles[1] = local.vect1[1]
    		self.angles = local.angles
    		local.angles = self.angles
    		local.angles[0] = local.vect1[0] + 180
    		local.angles[1] = 0
    		self.bulb.angles = local.angles
    		 
    		local.vect = self.origin - self.org.origin
    		local.vect = vector_normalize (local.vect)
    		local.dist = 16 // was 32
    		         
    		local.vect[0] = local.vect[0] * local.dist
    		local.vect[1] = local.vect[1] * local.dist
    		local.vect[2] = local.vect[2] * local.dist
    		 
    		self.flare.origin = self.bulb.origin - local.vect
    		self.flare scale 5
     
    		waitframe
    	}
     
     end
    
    
     aimspot: 
    
    	while (1){
    	
    		self.spotlight.origin = self.org
    		self.lightdist = 100 + ((vector_length(self.origin - self.spotlight.origin)) * 0.15)
    		self.spotlight lightRadius self.lightdist
     
    		local.org = self.org.origin
    		local.vect1 = (local.org - self.origin)
    		local.vect1 = vector_toangles (local.vect1)
    		local.angles = self.angles
    		local.angles[1] = local.vect1[1]
    		self.angles = local.angles
    		local.angles = self.angles
    		local.angles[0] = local.vect1[0] + 180
    		local.angles[1] = 0
    		self.bulb.angles = local.angles
    
    		waitframe
    	}
    	
     end
    
    seeme local.org:
     
    	local.p = parm.other
    	self.gun setaimtarget local.p
    	self.gun startfiring
    	wait 1
    	self.gun stopfiring 
    	self.gun setaimtarget NULL 
    	waitframe
    	self.gun setaimtarget self
    	local.p iprint "Don't get caught in the spotlights!" 1
    
    end

  3. #73

    Default

    Quote Originally Posted by Ancient Order View Post
    yes , this one only workk for m1l2a because of the hardcoded path stuff. Instead define your owns with set and group numbers in the map script and pass them to the spotlight2.scr when you call it...
    Thanks Mate, not sure if I have time to sort it all out this weekend.
    I will try to make use of it as soon as I can figure the stuff out.

    So I take it it will work with players and friendly ai ?

    I just lost my usb stick in the train with all the mod data on it, maybe it will turn-up again.
    How ever, I might have lost one or two days or work. But I need also need to restructure
    some stuff to prevent this from happening again...

  4. #74
    Client Beta Testers Appelpitje's Avatar
    Join Date
    Jan 2012
    Location
    Belgium
    Posts
    571

    Default

    Quote Originally Posted by chrissstrahl View Post
    I just lost my usb stick in the train with all the mod data on it, maybe it will turn-up again.
    How ever, I might have lost one or two days or work. But I need also need to restructure
    some stuff to prevent this from happening again...
    Use git or a cloud service?

  5. #75

    Default

    Ya, I am planning to get the mod on git, but you know programmers are lazy
    When I was working with git years ago it turned out to be so complicated that I didn't want to waste any more time on it.
    I don't remember exactly what the problem is but it did not work to make a bigger project go smoothly on git, there where probably to many binary files or something.

  6. #76

    Default

    Here is a little status update.
    I got m1l1, m1l2a, m1l2b and m3l2 working.
    m1l2b was the easiest by far with 3 days.
    I got a solid basis of replacement functions and a good routine by now.
    It is now replacing and testing most of the time for a script.
    Sometriggers don't work the same as in singleplayer and need to be moved or resized.
    There are a few things that will take quite some time, but they are mostly global so once they are worked out they will work for all other maps

  7. #77

    Default

    Would be better if you host the mod in a server so the players can test.

    With more people you problably going to catch some bugs you have missed.

  8. #78

    Default

    Quote Originally Posted by DoubleKill View Post
    Would be better if you host the mod in a server so the players can test.
    With more people you problably going to catch some bugs you have missed.
    There are to few maps right now.
    I got a good testing team, but yes at some point it would be good to host a coop mod server.
    (right now the mod is not meant to be used on a dedicated server)
    Right now it is more important to make good progress and get a generally working Mod going.
    I can iron out the smaller problems later, it is like washing and plolishing, it sould be done
    in the right order

  9. #79

    Default

    ********************
    ERROR: CL_ParseServerMessage: read past end of server message
    ********************
    ----- Server Shutdown -----
    ==== ShutdownGame ====
    Can anyone give me some pointers or ideas what could be causing this ?
    I know it is none of my scripting causing it.
    I was trying to bash a German Shepard when this happened.
    Okay, never mind, I found the issue.
    anim/dog_killed.scr
    PHP Code:
    // Make Some Damage Smokey Poofs
    if(1)
    {
    local.vec2 self.fact.direction
    local
    .vec2[0] = local.vec2[0] * -1
    local
    .vec2[1] = local.vec2[1] * -1
    local
    .vec2[2] = local.vec2[2] * -1
    /*here is the client error happening */ self damagepuff self.fact.position local.vec2

    Last edited by chrissstrahl; August 24th, 2018 at 03:24 PM. Reason: found

  10. #80

    Default

    Has anyone here expiriance with the ai ?
    I am trying to figure out how the disguise stuff works, but so far it seams that I have been looking at the wrong files.
    It would be nice to have it working in coop, so players can decide for them self how they want to do the mission (m2l2a).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •