Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

try to addspawnarg to AI :

 

death_script

notfrobable

 

in script file :

 

 

 

 

 

PS

 

my question :

how to change color of movable lanterns light ?

_color spawnarg change only color of glass

 

also what I can use to edit particles ?

 

 

Nope, sadly it doesn't work :/

Link to comment
Share on other sites

You can stop the AI be shouldered by giving it shoulderable 0 but it can still be dragged about so I presume that is what you don't want.

 

I found I could set the body unfrobable if I called it indirectly and also with a wait. A wait alone didn't work; it also needed calling indirectly by a lever. A wait of 0.25 didn't work. A wait of 1 did. Maybe 0.5 would work but I was reluctant to risk a borderline one in case sometimes it failed. But I was concerned the player might frob the body as it fell so didn't want it too long. I didn't manage to frob it as it fell but maybe it is possible?

 

This is what I set up:

 

On the AI:

  • death_script callOnDeath

 

  • A numberwheel entity
  • name it TestLever
  • target SetBodyUnfrobable

 


  •  
  • A atdm:target_callscriptfunction
  • name it SetBodyUnfrobable
  • call SetBodyUnfrobable

 

Two script functions:

 

void SetBodyUnfrobable()
{
sys.wait(1);
$TestAI.setFrobable(0);
}



void callOnDeath()
{
sys.trigger($TestLever);
}

Possibly the atdm:target_callscriptfunction might be called directly from the other function without the lever?

Link to comment
Share on other sites

Inventory icon:

 


  •  
  • Create a static model and place it at eye height in front of a wall textured textures/darkmod/sfx/black_matt
  • Take a screen shot
  • In paint program crop most of black and resize to 256 x 256 with moderate black border. If loot then allow a little more black at sides for loot info. Possibly angle it over, eg, hammer, sceptre, or upright, eg, crown, box. See some other icons for examples.
  • Select around the image with a tiny partial transparency of the black, a couple of pixels or so and make that an alpha channel
  • Save as tga with the alpha channel in guis/assets/hud/inventory_icons

Link to comment
Share on other sites

@Fidcal: Now I feel stupid. I should have seen the shoulderable spawnarg by myself. That should be exactly what I'm looking for. I'll get back to you if it doesn't do the trick. Thanks for your assistance :)

 

 

@Shadowhide: It seems like a problem with the alpha channel. Is the picture edited in, for example Photoshop? There you can make sure there is a valid alpha channel. In your case it should look like a black picture with a white hammer.

Link to comment
Share on other sites

I'm trying to make belted keys (the ones you pickpocket) droppable. But when I drop the key, it just floats in mid air. I believe it's still bound to the AI, but what's the easiest way to tackle this? I see some options:

 

1. Do some sort of swap so when you frob the key, the key disappears and instead a key from the blue room is added to the inventory, with the same properties as an "unbound" key.

 

2. Make some sort of script that unbinds the key when it's frobbed.

Link to comment
Share on other sites

1. Do some sort of swap so when you frob the key, the key disappears and instead a key from the blue room is added to the inventory, with the same properties as an "unbound" key.

 

add frob_script spawnarg to belt key

 

and write script :

 

void AddKey()

{

$KEYONBELT.remove();

 

$player1.addInvItem($NAMEOFKEY);

}

 

 

2. Make some sort of script that unbinds the key when it's frobbed.

 

i dunno...

 

maybe just add frob_script spawnarg to key and write in script :

 

void KeyUnbind()

{

$BeltKey.unbind();

}

 

 

?

 

ah and frob_script should looks like this :

 

frob_script

 

KeyUnbind

 

 

Edited by Shadowhide

Proceed with caution!

Link to comment
Share on other sites

Yes, you're looking for one of two script events

 

$AIname.dropAttachment ( string AttachmentName );

 

Or

 

$AIname.dropAttachmentInd( float IndexNumberOfAttachment ); (I think weapon is "0", and head is "1", other attachments would be 2+)

 

Wait, no I misread your problem. Keys should all be droppable without issue. Hrm... :huh:

 

Is your key "bind"-ed or "def_attach"-ed to the AI?

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

I just tested with bind and the key drops OK so there is something different in your setup.

 

Are you using bind and bindToJoint leftHips_dummy?

Normal key entity straight from the list?

Changed anything else on the key apart from perhaps inv name and inv_droppable 1

Link to comment
Share on other sites

Strange. What is the class name of the key entity? I suggest you make a test map. It's useful to always have a start room test map with just a basic large room, a few lights, player, and the ammo blue room prefab. You can then load that any time, save with a test name and add a few things quickly like an AI and a key. That's what I did and it works as it should. You might then see what is different in your map. Like you've set zero gravity or there is an invisible nodraw brush under the key! Or you're using a func_static key model instead of a proper key entity etc.

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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 0 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...