Jump to content
The Dark Mod Forums

Recommended Posts

Posted
11 hours ago, STRUNK said:

@MirceaKitsune @Bienie

I think I found a solution!!

VIDEO - Guards and Zombies don't bother dead bodies, but react to the player

EDITED. What I posted first didn't work. This I tested and think really works.


void DropDead() //Or whatever name you gave it
{
$Target1.setEnemy($Guard1); //Target1 is becoming enemy to Guard1 (before it dies)
			    //Guard1 is the name of the AI that shouldn't bother about the corpse							
$Target1.setEnemy($Guard2);
$Target1.setEnemy($Guard3);
$Target1.kill();

$Target2.setEnemy($Guard1);
$Target2.setEnemy($Guard2);
$Target2.setEnemy($Guard3);
$Target2.kill();

$Target3.setEnemy($Guard1);
$Target3.setEnemy($Guard2);
$Target3.setEnemy($Guard3);
$Target3.kill();
}

Be sure to put the Guard(s) in a different team then the Target(s) (In the enty editor, spawnarg team) and that they are not too close to the Target(s) when they drop dead.

To work for zombies, just use the "old" DropDead script and set the zombie's spawnarg acuity_tact to 0

Thanks for all the effort you put into solving this! I think I have an acceptable script now, though it's a bit different than the one you suggest. What I ended up doing was merging your idea with @Dragofer's, who suggested turning off the stims of the corpses by using "$name_of_ai.StimEnable(14, 0);" and then putting the spawnarg "acuity_tact 0" on the revenants. Now they completely disregard the corpses on the ground, but interestingly they don't lose their ability to sense if the player knocks into them. This way I don't have to worry about setting teams / enemy status. My script essentially looks like this for reference:

void killguards()
		{
	$guard1.kill();
	$guard1.StimEnable(14, 0); //and so on for every guard
		}

All the revenants have spawnarg acuity_tact 0 and the guards are teleported to places where they won't accidentally block a door if they happen to be opening one on their patrol when the script is triggered.

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 0: To Catch a Thief                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 1: Pearls and Swine                    Langhorne Lodge

Chronicles of Skulduggery 2: A Precarious Position              

Chronicles of Skulduggery 3: Sacricide

 

 

 

Posted (edited)

@Bienie

That is even less script, so that's good : )

I thought acuity_tact to 0 would somehow change the behaviour of AI a bit and would be least noticable on zombies. Intrestingly zombies don't seem to need having StimEnable (14, 0) on the dead bodies to not see them.

Could you test with only acuity_tact:0? It looks like that might be the only thing needed from my quick test.

Edited by STRUNK
Posted
5 hours ago, STRUNK said:

@MirceaKitsune

Dou you have all the music for your locations defined in your location settings entity?

In atdm:location_settings, each sound defined on that entity is then referenced by every respective info_location. This works fine and just as intended BTW, but I'm just curious how I can have a trigger make the player ignore it and hear a only specific song from there on.

Posted

@MirceaKitsune

Ok, you can add the following to your script, that can be called by completing an objective:

void ChangeMusic()
{
$LocSet.stopSound(0,0);  //LocSet is the name of the atdm:location_settings
sys.trigger($FinalMusic);  //FinalMusic is the name of a atdm:speaker_ambient_music
$LocSet.setKey("snd_room1","nosound");    //snd_room1 is the name of a location
$LocSet.setKey("snd_room2","nosound");  
}

An atdm:speaker_ambient_music is heard in the whole map, so you set the music there that should be played from that moment to the end. You should aad this in your map and make shure to set s_waitfortrigger:1

 

Posted
14 minutes ago, STRUNK said:

@MirceaKitsune

Ok, you can add the following to your script, that can be called by completing an objective:

void ChangeMusic()
{
$LocSet.stopSound(0,0);  //LocSet is the name of the atdm:location_settings
sys.trigger($FinalMusic);  //FinalMusic is the name of a atdm:speaker_ambient_music
$LocSet.setKey("snd_room1","nosound");    //snd_room1 is the name of a location
$LocSet.setKey("snd_room2","nosound");  
}

An atdm:speaker_ambient_music is heard in the whole map, so you set the music there that should be played from that moment to the end. You should aad this in your map and make shure to set s_waitfortrigger:1

 

Thanks. No way without a script I take it? If not I may go with this option then.

Posted

@MirceaKitsune

I can't think of another posibility. You already have a script for the killing AI when taking the trophy (I think). This works the same and you put it in the same script file, so it should be easy. Only thing is you have to put all your locations into it to get all their music to nosound so only the final music is heard everywhere.

Posted
2 minutes ago, STRUNK said:

@MirceaKitsune

I can't think of another posibility. You already have a script for the killing AI when taking the trophy (I think). This works the same and you put it in the same script file, so it should be easy. Only thing is you have to put all your locations into it to get all their music to nosound so only the final music is heard everywhere.

Fair enough. Will try that in that case.

And since I already have a script, I should get to the next fun effect I wanted to ask about, which I know for sure will require one. What would I use to make a script function which, when called by an atdm:target_callscriptfunction powered by a trigger_timer, causes a list of moveable entities to fly in a random direction? Let's just say I want that for a poltergeist effect, to get things like spoons and candles to fly around every few seconds. Theoretically I only need to give each object a random velocity per call... something between -1 and 1 on the X and Y axis, 0 and 1 on the Z axis (no point in pushing it into the ground just upwards).

Posted

@MirceaKitsune

There is a scriptfunction moveToTarget that I use for a bat, chasing a semi-random moving target. You could have some targets moving "around",  and have the items move to these targets. Do they have to fall down again?

Posted
11 minutes ago, STRUNK said:

@MirceaKitsune

There is a scriptfunction moveToTarget that I use for a bat, chasing a semi-random moving target. You could have some targets moving "around",  and have the items move to these targets. Do they have to fall down again?

Yeah. I think the easiest way here would be to give the moveable entity a velocity, as if the player was throwing it. Though that sounds like it could be useful to make them be thrown at the player instead of randomly, which would also be cool :D

Posted

@MirceaKitsune

I have something simple but effective working for 1 object now. It looks just as throwing and it's going a different direction every time. Tomorrow I'll look at how to have more objects thrown in random order, with random time between throws. This is already very cool, and with very little change throws can be at the players head also : D

Posted

grafik.png.e4a9be2e91eedc67dea1312b2dec4456.png

 

grafik.png.8ff9d4753a3a865a068d536f0da7fbc8.png

 

The console reports the three portals to be useless. However, I need them for correct sound propagation. Is there a way to force VP calculation...or do I have a fundamental misunderstanding here...?

 

Posted

‘Useless’ means they’re probably completely embedded in a world brush.

They won’t affect sound propagation.

just revisit them and either remove, or move them out of the walls and put them where they’ll contribute to sound management.

Posted
1 hour ago, grayman said:

‘Useless’ means they’re probably completely embedded in a world brush.

They won’t affect sound propagation.

just revisit them and either remove, or move them out of the walls and put them where they’ll contribute to sound management.

The portals are not embedded in brushes - see attached file.

The respective  positions are really as depicted in the editor screenshot above.

Hm...

vp1.map

Posted

Found a much simpler way to get the flying objects effect I wanted: No movers or fake positional entities required, just a repeater to call the script and a sequencer to pick the random target. Using this method you can still leave the moving entity as frobable, it will only jump while you aren't holding it :)

void poltergeist()
{
	entity obj=$trigger_sequencer_1.randomTarget("nothing");
	float str = 1000;
	vector vel = '0 0 0';

	vel_x = (-1 + sys.random(2)) * str;
	vel_y = (-1 + sys.random(2)) * str;
	vel_z = sys.random(1) * str;

	obj.setLinearVelocity(vel);
}

 

  • Like 1
Posted (edited)
31 minutes ago, MirceaKitsune said:

Found a much simpler way to get the flying objects effect I wanted: No movers or fake positional entities required, just a repeater to call the script and a sequencer to pick the random target. Using this method you can still leave the moving entity as frobable, it will only jump while you aren't holding it :)

Nice! You are learning fast!

You trigger it with a trigger with random wait time I guess? I posted a video with added fx. You could use the same trigger and an other trigger to tiggeron/off sound and visual fx : )

In my adjusted script it also only jerks on it. Looks quite spooky actually. I found there is also moveable loot that can be used, only if the player get's the loot it's still listed in the trigger_sequencer, and the script stops when it can't find the (random chosen) entityname.

Edited by STRUNK
Posted (edited)

At this stage I need help with one more spooky effect: I want to make a particle blood spawner, pretty much an entity that constantly leaks blood once triggered. If possible I'd like the particles to spawn decals on surfaces they touch so they get stained with blood from the fountain, as happens when you hit an AI with the sword or an arrow. Is there a default particle entity for that?

Edited by MirceaKitsune
Posted

@MirceaKitsune

Lol, I let your script and mine run together it does add up, where your script also has a difference in move speed and distance moved, my script just flings the stuff with the same speed. Also, sometimes two objects move at the same time this way or get influenced by the 2 scripts in the same move. Maybe you could try running your script 2 times (different names and different random triggers)?

VIDEO - 2 annoyed Ghosts throwing stuff around

I make a little bow for script btw, I can't abbreviate my thought into script like this, 'caus i'm thinking cogs and rods : )

Also, is it an objective to set the ghosts free?

Posted
2 hours ago, JackFarmer said:

The portals are not embedded in brushes - see attached file.

The respective  positions are really as depicted in the editor screenshot above.

Hm...

 

Why do you have the visportal faces on the edges of those brushes?

dmap is telling you correctly that the vp faces are embedded entirely in the world brushes they border.

Use DR's "brush->Make Visportal" button to create legal visportals.

 

  • Thanks 1
Posted
25 minutes ago, STRUNK said:

@MirceaKitsune

Also, is it an objective to set the ghosts free?

I'd rather release my FM before I say much about it. Let's just say I'm sure many will surely find it... interesting.

Please let me know about that blood particle spawner when anyone who has an idea of that is around. Kinda the last thing I need to do... as far as the basics go, most that's left is detailing and fixing a few bugs.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Frost_Salamander

      @taaaki Wiki seems broken. Main page works but click any link and:

      · 0 replies
    • Goblin of Akenash

      Another goblin secrets episode on the way with the new update
      Focuses are:
      supporting 100% runs on shadow playstyles
      fixing the softlock
      and a tiny visual upgrade

      · 0 replies
    • STiFU

      Sorry for not being around enough lately. I am extremely busy at the moment. We are trying to build a home and the German bureaucracy is killing me! Meanwhile, child number 2 is underway. 🙂
      · 0 replies
    • cvlw

      Yo TDMers.
      It has been a while.  This past year or so I have encountered some tough family issues, became a grandfather, had a job change, and then Steam offered Dishonored and Dishonored 2 along with all DLC for like 5 dollars.  So... have played that.  What a game; highly recommend.
      I am looking to resume TDM activity soon.
      Clint
      · 2 replies
    • Airship-Ballet

      If anyone would like some ambient sounds for any of their work please do hit me up - I've tons of strings both physical and sampled that I love making loops with
      · 2 replies
×
×
  • Create New...