Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

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

 

 

 

Link to comment
Share on other sites

@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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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

Link to comment
Share on other sites

@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

Link to comment
Share on other sites

‘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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

@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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 4 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...