Jump to content
The Dark Mod Forums

Aosys

Member
  • Posts

    277
  • Joined

  • Days Won

    8

Posts posted by Aosys

  1. Ah, I should probably specify one thing: the script I got is from the wiki, specifically this page:

     

    http://wiki.thedarkmod.com/index.php?title=Clock-Triggered_Game_Events

     

    I realize that main is where you activate scripts at map start, but trying to do so would only trigger the first runClock method because of some kind of conflict. So if I had something like

    void main ()
     {
    	sys.waitFrame();
    	runClock($clock_hand_big, $clock_hand_small);
    	runClockDummy($clock_hand_big2, $clock_hand_small2);
    	runClockDummy($clock_hand_big3, $clock_hand_small3);
    	runClockDummy($clock_hand_big4, $clock_hand_small4);
     }
    

    only the line after sys.waitFrame() gets activated. That's why I tried using the "starting the clock during the mission" method, which is what's broken currently.

  2. Hi all, I'm currently having some problems with scripting a clock tower. I'd like to use the prefab scriptevents clock, and my idea for the setup is thus: one of the four clocks will call the script that sets the sys time, which in turn is what eventually activates the chime. The other 3 clocks should sync with that clock through a similar method (just minus affecting sys time). This way, only one clock is responsible for the chiming, but all of them should always read the same time no matter what. Because of a conflict between the two runClock methods when attempting the main method route (they work independently, but not when applied together), I tried opting for a trigger setup. My script is as follows:

     

     

     

     void runClock(entity bigHand, entity smallHand)
     {
     	float hours = 11;
     	float mins = 59;
     	float secs = 58;
     	float strike = 0;
     
     	while (1)
     	{
     		bigHand.rotateOnce('0 0 0.1017');  //1 min in 59 secs as no move when hour incremented
     		sys.waitFor(bigHand);
     		secs = secs + 1;
     
     		//clone any number of these.....
     		if (mins == 99 && hours == 99) // set hours & mins to trigger any entity
     		{
     			$yourEntity.activate($player1);  //replace 'yourEntity' with any entity to be triggered
     		}
     
     		if (secs == 59)
     		{
     			smallHand.rotateOnce('0 0 0.5');
     			sys.waitFor(smallHand);
     			secs = 0;
     			mins = mins + 1;
     
     			if (mins == 60)
     			{
     				mins = 0;
     				hours = hours + 1;
     				sys.setcvar("game_clock_hours",hours);
     				$ClockStrike.activate($player1);
    
     				if (hours == 12)
     				{
     					hours = 0;
     				}
     			}
     		}
     	}
     }
     
      void runClockDummy(entity bigHand, entity smallHand)
     {
     	float hours = 11;
     	float mins = 59;
     	float secs = 58;
     	float strike = 0;
     
     	while (1)
     	{
     		bigHand.rotateOnce('0 0 0.1017');  //1 min in 59 secs as no move when hour incremented
     		sys.waitFor(bigHand);
     		secs = secs + 1;
     
     		//clone any number of these.....
     		if (mins == 99 && hours == 99) // set hours & mins to trigger any entity
     		{
     			$yourEntity.activate($player1);  //replace 'yourEntity' with any entity to be triggered
     		}
     
     		if (secs == 59)
     		{
     			smallHand.rotateOnce('0 0 0.5');
     			sys.waitFor(smallHand);
     			secs = 0;
     			mins = mins + 1;
     
     			if (mins == 60)
     			{
     				mins = 0;
     				hours = hours + 1;
     				//sys.setcvar("game_clock_hours",hours);
     				$ClockStrike.activate($player1);
    
     				if (hours == 12)
     				{
     					hours = 0;
     				}
     			}
     		}
     	}
     }
     
      void clockChime()
     {
     	float hours = sys.strToFloat(sys.getcvar("game_clock_hours"));
     	float strike = 1;
     
     	while(strike <= hours)
     	{
     		$ClockStrike.startSound("snd_effect", SND_CHANNEL_BODY, false);
     		sys.wait(3);
     		strike = strike + 1;
     	}
     }
    
    void startClock()
    {
    	runClock($clock_hand_big, $clock_hand_small);
    }
     
    void startClock2()
    {
    	runClockDummy($clock_hand_big2, $clock_hand_small2);
    }
    
    void startClock3()
    {
    	runClockDummy($clock_hand_big3, $clock_hand_small3);
    }
    
    void startClock4()
    {
    	runClockDummy($clock_hand_big4, $clock_hand_small4);
    }
     
    void main ()
     {
    	sys.waitFrame();
     }
    
    

     

     

     

    I then attempted to set a trigger on a normal worldspawn brush to a trigger relay. This in turn is set to trigger multiple atdm:target_callscriptfunction entities, all set to activate their respective startClock methods. The idea is to activate all clocks on map start.

     

    Predictably, none of it is working, which means I done goofed somewhere. The hands all have the proper names, so I know it's not that. Any ideas on how I can fix this?

  3. Oh hey, I'd been working on collecting some stuff about rooms for mansions, so I might be able to add some things. In the meanwhile, here's some stuff that might be relevant:

     

     

    ^ Of particular note is around 5:42, when he starts talking about the importance of showing off beds to convey social status. Private bedrooms are actually a very modern concept, which means that in TDM's quasi-medieval setting, it might not be out of place to see a bed and a dining table in immediate proximity to each other...

     

    https://en.wikipedia.org/wiki/Room

     

    https://en.wikipedia.org/wiki/House#History_of_the_interior

    • Like 2
  4. https://support.microsoft.com/en-us/help/4012212/march-2007-security-only-quality-update-for-windows-7-sp1-and-windows-server-2008-r2-sp1

     

    Note this:

     

     

    This Security Only Quality Update is not applicable for installation on a computer where the Security Monthly Quality Rollup or Preview of Monthly Quality Rollup from March 2017 (or a later month) is already installed, because those updates contain all of the security fixes that are included in this Security Only Quality Update.

  5. Alright, so I played around with it a little bit and found that normally, DR doesn't let you create new layers with the same name as a preexisting layer:

     

    LVrdRsx.jpg

     

    However, it looks like when you try to rename already-existing layers with the same name as other existing layers, that failsafe isn't present and the window freaks out, with that weird floating button being the result:

     

    pwXBJKY.jpg

     

    After playing around with it, I found that if you know which layer you had double of, you could find the new duplicate layer (let's call that Layer 2 named "Balcony"), rename it to something new, and the original layer (Layer 1 also named "Balcony") will then appear again. The problem is that the floating button appears to be permanent after that, and I have no idea how I fixed it the first time, but it wasn't with a text editor (though that method certainly is good to know!).

     

    At least I think this is what's going on, but someone else testing to confirm whether I'm correct might be a good idea.

     

    Is there a bugtracker for this issue, or should a new one be created? I can try doing it if you folks would like?

  6. I don't think it's a corrupt file, just a DR bug, since I too ran into this exact problem about a week or two ago. I believe I was able to make it go away by renaming the redundant layer to something different (some closing of windows/restarting of DR might be needed afterwards), but I'd have to go back and do some more testing to confirm this.

  7. Are there any ASE scripts that will work with Blender 2.78c? I just got a fresh copy up and running, and I'm sitting on two models I'd like to try getting into the mod (one of which is possibly ready right now, aside from needing scaling/texturing and maybe a normalmap that I never got to bake properly), but frankly I can't do anything with them atm ): If anyone more versed in Blender than I am would like to look at them and give critiques/advice, that would be awesome too...

  8. Ok, so first of all I thought I'd say that the new mission is awesome. Seriously, nice work! Had a ton of fun playing it, and I thought that combination puzzle was clever (:

     

    One minor thing I found in the new St. Lucia though; there's a section of building clipping through into a hallway near the beginning:

     

     

     

     

    vI9TcQf.jpg

     

     

     

     

    It doesn't seem to affect pathing or anything, so nbd, but just thought I'd mention it.

    • Like 1
  9. So I tried my original func_static method and didn't get the same console printout as last time, which is odd. Still no head in-game though. Also tried the atdm:attachment_point_swinging_lod and actually got a full-blown game error (x y z are just the numerical coordinates of the object):

    Game Error
    
    idAnimated 'atdm_attachment_point_swinging_lod_1' at (x y z): cannot find anim 'idle'
    

    func_animate produces console printout:

    WARNING: idAnimated 'func_animate_1' at (x y z): cannot find joint 'origin' for sound playback
    
    • Like 1
  10. I know there's been a lot of talk about lighting recently, and while I know absolutely nothing about how TDM's lighting systems actually work or what's been done technically to tweak them, this video seemed like it might be relevant? It's completely Blender-centric though, but I thought it was an interesting watch:

     

×
×
  • Create New...