Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Building on what VanishedOne wrote, there are a couple of ways to mark an objective as "invalid". It still shows up in the objectives list, but with a "crossed out" symbol in the checkbox.

You can do it with script code:

$player1.setObjectiveState( objNum, OBJ_INVALID ); 

where objNum is the objective number, e.g.:

$player1.setObjectiveState( 8, OBJ_INVALID ); 

Or with an atdm:target_setobjective_state object with the following spawn args:
"obj_id1" "8"
"obj_state" "2"

(once again, assuming the objective is number 8). Make the atdm:target_setobjective_state the target of a trigger.
 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Yes. 'Invalid' is just another state, like 'incomplete' or 'failed', and internally it's state 2. See also http://wiki.thedarkmod.com/index.php?title=Objectives#Notes_on_using_INVALID_status

There doesn't seem to be a corresponding HUD message though, so that would need to be added by the mapper if desired.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

1. Spin me left round, baby.

I have four separate func_rotate entities. When triggered, two shall rotate clockwise (blue), two shall rotate conter-clockwise (yellow).

rotate.jpg.4aa538f4326bef0400f40bc380ec22ec.jpg

When triggered, they rotate clockwise only. Only when stopped and triggered again, they change direction.

How can I do that? I cannot find any property for that and I cannot find further information in the entity database regarding this. 

 

2. Thing on a (static) spring.

 I need a translating mover doing the steps as described below. How can I do that?

Translate.jpg.9120dcb732f1b66843190e56bc65d150.jpg

 

 

Edited by JackFarmer
  • Like 1
Link to comment
Share on other sites

From a glance at func_rotating, "invert_on_trigger" "0" should stop the direction reversing.

Try a negative value for "speed" to make them rotate in the opposite direction.

I'm not sure from the diagram whether you want a mover that moves from A to B or B to A when triggered (isn't that a regular binary mover, like a sliding door?) or whether you want one that cycles back and forth (func_bobbing?).

  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

3 minutes ago, VanishedOne said:

I'm not sure from the diagram whether you want a mover that moves from A to B or B to A when triggered (isn't that a regular binary mover, like a sliding door?) or whether you want one that cycles back and forth (func_bobbing?).

Yeah, you are right.  It just shall move up and down and up and down along the Z axis. Can I do this with func_bobbing?

Link to comment
Share on other sites

On 9/12/2019 at 5:01 PM, joebarnin said:

Building on what VanishedOne wrote, there are a couple of ways to mark an objective as "invalid". It still shows up in the objectives list, but with a "crossed out" symbol in the checkbox.

You can do it with script code:

$player1.setObjectiveState( objNum, OBJ_INVALID ); 

where objNum is the objective number, e.g.:

$player1.setObjectiveState( 8, OBJ_INVALID ); 

Or with an atdm:target_setobjective_state object with the following spawn args:
"obj_id1" "8"
"obj_state" "2"

(once again, assuming the objective is number 8). Make the atdm:target_setobjective_state the target of a trigger.
 

Ohh, ok that sounds pretty easy. Maybe I'll try that. I just used a setobjective_visibilty to hide them instead.

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

I have a machine in my mission that controls the power. I want the player to first find a lever to operate the machine, which I have added to the map and it works well. I just can't figure out how to have the player activate the machine, and have the game check if the player has the lever in their inventory and then remove it when they frob the machine, and then it appears on the machine. I figure the last part should be a second lever that becomes visible when the previous conditions are met. I assume there's a bit of scripting involved, which is my weakest mapping skill by far.

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 start with writing down the names of your 2 levers + the machine as well as the coordinates of where the 2nd lever needs to be on the machine.

Give the machine the spawnarg "frobable" "1" and then at the top of DR's window select Entity -> Stim/Response -> switch to Response tab -> add a response to frob -> right-click in the response effects box & click add, right-click edit the new effect, repeat for these 3 effects:

1) "teleport (set origin)" the second lever so that it ends up on the machine

2) "set frobable" "_SELF" and leave frobability unticked so that the machine is no longer frobable

3) "run script" "remove_lever" for this simple script to remove the first lever from the inventory (technically the above 2 steps could be in this script too, but just to show what S/R can do)

void remove_lever()
{
    $player1.replaceInvItem($lever,$null_entity);
}

 

To make this response only occur when the player has picked up the first lever, right-click on "frob" in the left of the machine's Response tab and deactivate it. Now use the above steps to give the first lever the effect "Activate Response" "Frob" on the machine.

Edited by Dragofer
  • Like 2
Link to comment
Share on other sites

On 9/13/2019 at 7:36 PM, Dragofer said:

@Bienie start with writing down the names of your 2 levers + the machine as well as the coordinates of where the 2nd lever needs to be on the machine.

Give the machine the spawnarg "frobable" "1" and then at the top of DR's window select Entity -> Stim/Response -> switch to Response tab -> add a response to frob -> right-click in the response effects box & click add, right-click edit the new effect, repeat for these 3 effects:

1) "teleport (set origin)" the second lever so that it ends up on the machine

2) "set frobable" "_SELF" and leave frobability unticked so that the machine is no longer frobable

3) "run script" "remove_lever" for this simple script to remove the first lever from the inventory (technically the above 2 steps could be in this script too, but just to show what S/R can do)


void remove_lever()
{
    $player1.replaceInvItem($lever,$null_entity);
}

 

To make this response only occur when the player has picked up the first lever, right-click on "frob" in the left of the machine's Response tab and deactivate it. Now use the above steps to give the first lever the effect "Activate Response" "Frob" on the machine.

Thanks! That was very helpful. I got it to work, but I should add I had to do a few things differently.

When I teleported the lever and then activated it, it translated around the pre-teleport origin and disappeared. I solved it by instead using a second script to hide the lever until the machine is frobbed.

I also had to add a target_set_frobable around the machine so that the player can't frob the machine before they have picked up the lever. But in the end, all is wel!

  • Like 1

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

Not sure how elaborate the last part was for you, but it could be achieved quite easily via S/R: you set the machine as non-frobable at the beginning and give the lever (that goes into the inventory) a response to frob with the effect "set machine frobable". Not sure if this is easier than what you did, but wanted to mention it.

  • Like 1
Link to comment
Share on other sites

12 hours ago, Destined said:

Not sure how elaborate the last part was for you, but it could be achieved quite easily via S/R: you set the machine as non-frobable at the beginning and give the lever (that goes into the inventory) a response to frob with the effect "set machine frobable". Not sure if this is easier than what you did, but wanted to mention it.

Thanks, yes I did kind of a mid point between those things. I did end up putting a frob response on the lever to trigger the target_set_frobable entity instead, since using an intermediate trigger_once didn't work. I guess your method would mean even less clutter, but it works now so I think I will leave it as is.

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

All I remember was for func_stats you'd convert them back to brushes, resize, then convert them back to func_stats. But I don't even know offhand if that applies here.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

That's one way, another way is to hit tab to cycle through the individual brushes and patches.

A 3rd method to handle it is to group them instead of converting to a func_static.  This way they can be modified but are still selected together. When you've reached the final shape you can convert to func_static.

Edited by Dragofer
Link to comment
Share on other sites

Shadow_casting.thumb.jpg.a96f09ec748ca29f29feac22b57517d3.jpg

The entity atdm:moveable_lantern_oil_hand_lit creates correct shadows with the barrels (A)  I've constructed from patches and cylinders (have turned them into func statics).

Using the same light source with a container (B) constructed from brushes (and turned into func statics) does only create shadow casting on certain brushes, but works ok again on another barrel (C).

What is my mistake?

 

 

Link to comment
Share on other sites

One-sided frobability for doors?

I made some doors into a garden that I only want to be able to be opened from the inside (without a key), and only be frobable  from the inside.

Is there a property that I can give to a (no drow) brush that blocks frobability? Or something else that solves this?

 

 

 

 

Link to comment
Share on other sites

That seems like a poor idea, gameplay-wise. Players should know whether a door is openable, or why it's not openable at the moment. A door frobabble on one side and inactive on other is inconsistent and misleading. You could try to block a door e.g. with crates, so players can see that there's something blocking them from the other side.

Edited by peter_spy
Link to comment
Share on other sites

2 hours ago, peter_spy said:

That seems like a poor idea, gameplay-wise. Players should know whether a door is openable, or why it's not openable at the moment. A door frobabble on one side and inactive on other is inconsistent and misleading. You could try to block a door e.g. with crates, so players can see that there's something blocking them from the other side.

I think it's a good idea : )

Link to comment
Share on other sites

22 hours ago, STRUNK said:

One-sided frobability for doors?

I made some doors into a garden that I only want to be able to be opened from the inside (without a key), and only be frobable  from the inside.

Is there a property that I can give to a (no drow) brush that blocks frobability? Or something else that solves this?

 

 

 

 

Here's something I did - maybe it'll work for you. Create a thin no draw brush (e.g., tdm_nodrawsolid_wood) that lays on top of the door (in front of it). Convert it to func_static. Set frobable=1. You may have to set frob_distance to a value too. This will 'catch' the frob and prevent the door from getting it. At least, that's what I think happens. Anyway, it worked for me.

Specifically, I was having trouble with a user frobbing a switch from the other side of a wall. The switch was on side A of the way, but the player could frob it from side B. So I put the frobable brush on side B, and it blocked the switch from getting frobed from side B.

Link to comment
Share on other sites

1 hour ago, JackFarmer said:

1.  Activation of func-bobbing entity

How can I switch in on/off?

I have tried the following:

a. on -- 0

b. off - 1

c start_off - 1

d. start_on - 0

...but none works.

----------------------------------------------

2. Cutting patches

Is there a way to cut patches?

#1 - I found this in tdm_events.script:

/**
 * Initiates a translation back and forth along the given vector with the given speed and phase.
 */
scriptEvent void        bob(float speed, float phase, vector distance);
 

So maybe that's a way to get things to bob or stop bobbing? I tried a few experiments but couldn't get it to work, but maybe you'll have better luck.

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  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • 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.
      · 4 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
×
×
  • Create New...