Create a free account to remove all ad content.

Author Topic:  Sanity in TMF DD scripts  (Read 2159 times)

0 Members and 1 Guest are viewing this topic.

Dryym

  • Supreme Member
  • *
  • Posts: 4336
  • What's yours is mine. ~TM's Resident Master Thief~
    • View Profile
  • Xbox: dryym
Re: Sanity in TMF DD scripts
« Reply #10 on: January 30, 2016, 01:46:18 PM »
I tried that. IsBlock 'lit' didn't seem to support [prel:x,x,x] in any way I tried.

DD doesn't support mob spawn unfortunately. Great idea tho! And I dig the second idea, but have no clue how I could pull that off. Maybe zone related.

I have a cctv script that gives the player a close up of Diablos face that runs for [300].

It does, I have a set up that adjusts the brightness of the world depending on the light level at your head.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

Rev Elevenclaw

  • Sr. Member
  • *
  • Posts: 372
    • View Profile
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #11 on: January 30, 2016, 06:09:43 PM »
It does, I have a set up that adjusts the brightness of the world depending on the light level at your head.
Ok, but there can be no block where your head is. So I'm not sure how to set it up. Mind posting your script?
Focus determines reality...

Dryym

  • Supreme Member
  • *
  • Posts: 4336
  • What's yours is mine. ~TM's Resident Master Thief~
    • View Profile
  • Xbox: dryym
Re: Sanity in TMF DD scripts
« Reply #12 on: January 30, 2016, 06:17:03 PM »
Ok, but there can be no block where your head is. So I'm not sure how to set it up. Mind posting your script?

I just did something like

"
If
  IsBlockLit [vrel:0,0,0] [Sun|Block] [True]
Then
  DarkenScreen
Else
  LightenScreen
EndIf
Loop
"

There doesn't need to be a block for a coordinate to be lit.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

Rev Elevenclaw

  • Sr. Member
  • *
  • Posts: 372
    • View Profile
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #13 on: January 30, 2016, 08:13:42 PM »
Cool I will try that. TY
Focus determines reality...

Rev Elevenclaw

  • Sr. Member
  • *
  • Posts: 372
    • View Profile
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #14 on: January 31, 2016, 11:58:02 PM »
I just did something like

"
If
  IsBlockLit [vrel:0,0,0] [Sun|Block] [True]
Then
  DarkenScreen
Else
  LightenScreen
EndIf
Loop
"

There doesn't need to be a block for a coordinate to be lit.
I fiddled around with what you gave me here, and I got it to work! So TY, it will be the script I post next.
Focus determines reality...

Rev Elevenclaw

  • Sr. Member
  • *
  • Posts: 372
    • View Profile
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #15 on: February 04, 2016, 07:28:03 AM »
As mentioned previously, a script a day has been posted to the list up top of this topic. More to come.
Focus determines reality...

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Sanity in TMF DD scripts
« Reply #16 on: February 04, 2016, 07:56:37 AM »
All your scripts here are good, there is nothing incorrect that I can see, so my comments are just some optional tips.

sanity\insanity
If
   Intersect [sphere] [prel:0,1,0] [5] [mobs]
Then
   History [sanity] [player] [-1]
   Loop [2000]
Endif
   Loop [100]

Because the intersect command requires a host ping and return ping in multiplayer, it's best to only execute them when absolutely necessary. In the script above, if you only want to reduce sanity if the player has sanity (history:sanity > 0) then it would be best to do a HasHistory check before the Intersect command so it's not executed if the player is insane.

Also a Loop [100] is too short a delay to cope with a general connection ping time (two pings). I'd go for loop [800-1000] there. It's not going to make a big difference to the accuracy of the sanity.

An alternative to two loop commands is a loop at the end, and use a wait when you want extra delay. This can make it easier to read the script. Personal choice.
e.g.
If
   HasHistory [sanity] [player]
   Intersect [sphere] [prel:0,1,0] [5] [mobs]
Then
   History [sanity] [player] [-1]
   Wait [1200]
Endif
Loop [800]

sanity\sangainplayers
If
   Intersect [sphere] [prel:0,1,0] [10] [player]
   HasHistory [sanity] [player] [<] [100]
Then
   History [sanity] [player]
   Loop [200]
Endif
Loop [100]

Same as above, because of potential delays with the intersect command in multiplayer it's best to do any other conditionals before the Intersect to minimize the number of times it might have to be executed. And the loops are too fast here. [500] would be absolute minimum I'd use if an intersect command is involved.

If
   HasHistory [sanity] [player] [<] [100] // swapped
   Intersect [sphere] [prel:0,1,0] [10] [player]
Then
   History [sanity] [player]
Endif
Loop [500]
« Last Edit: February 04, 2016, 07:58:14 AM by Craig »

Rev Elevenclaw

  • Sr. Member
  • *
  • Posts: 372
    • View Profile
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #17 on: February 04, 2016, 08:28:05 AM »
Great suggestions Craig. I'll implement the changes, and update them here soon. TY
Focus determines reality...

Rev Elevenclaw

  • Sr. Member
  • *
  • Posts: 372
    • View Profile
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #18 on: February 04, 2016, 10:15:56 AM »
Is this,

HasHistory [sanity] [player]

And this,

HasHistory [sanity] [player] [true]

The same?
Focus determines reality...

Rev Elevenclaw

  • Sr. Member
  • *
  • Posts: 372
    • View Profile
  • Xbox: Rev Elevenclaw
Re: Sanity in TMF DD scripts
« Reply #19 on: February 04, 2016, 10:50:36 AM »
Script list updated...
Focus determines reality...