Author Topic: [Skills] local/global skills q  (Read 2021 times)

0 Members and 1 Guest are viewing this topic.

.ok

  • Supreme Member
  • *****
  • Posts: 2212
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site 2 years on site Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site
    • View Profile
    • Awards
[Skills] local/global skills q
« on: June 18, 2016, 09:21:40 PM »
so i wanna put local skills on my map in the future where now its global,but so that way i can modify stats and stuff and use them in my scripting,but my q is:

what level would i need to make everything to where it'd be like playing w/o skills on,or where you have the equal stats as to playing w/o skills on?sorry if it seems confusing




Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: local/global skills q
« Reply #1 on: June 18, 2016, 09:45:09 PM »
I asked this same question about 10000 topics ago.

Health: 47
Attack: 25
Strength: 30
Defence: 10
Ranged: 25

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

.ok

  • Supreme Member
  • *****
  • Posts: 2212
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site 2 years on site Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site
    • View Profile
    • Awards
Re: local/global skills q
« Reply #2 on: June 18, 2016, 10:15:47 PM »
I asked this same question about 10000 topics ago.

Health: 47
Attack: 25
Strength: 30
Defence: 10
Ranged: 25
alright thanks
i wanna have scripts that affect the levels of people(boost in stats) for different effects or if my zombie map,for the pack-a-punch,where you cant really change stats in global skills

so this will come in handy




crazytater94

  • Supreme Member
  • *****
  • Posts: 2645
  • Mastering TM since 2011
  • Awards Awarded to exemplary forum members 5 years on site Members who have unlocked the robotic avatar 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Former MotM winners Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site
    • View Profile
    • Awards
  • Xbox: crazytater94
  • PSN: crazytater94 (Inactive)
  • Steam: crazytater94
Re: local/global skills q
« Reply #3 on: June 18, 2016, 10:39:20 PM »
You can just use this for when they pack a punch...

If
HasHistory [PackAPunch] [player] [true]
Intersect [ray] [vRel:0,0,0] [vRel:30,0,0] [mobs]
HasHistory [Ammo] [player] [true]
Then
Context [target]
Health [-75]

Elseif

HasHistory [PackAPunch] [player] [false]
Intersect [ray] [vRel:0,0,0] [vRel:30,0,0] [mobs]
HasHistory [Ammo] [player] [true]
Then
Context [target]
Health [-25]

Elseif
HasHistory [Ammo] [player] [false]
Then
Notify [out of ammo...] [Local] [r,g,b]


Use this as the script for the gun and then if they pack a punch, the gun does more damage, if they don't, then it does regular damage

.ok

  • Supreme Member
  • *****
  • Posts: 2212
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site 2 years on site Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site
    • View Profile
    • Awards
Re: local/global skills q
« Reply #4 on: June 18, 2016, 11:17:44 PM »
You can just use this for when they pack a punch...

If
HasHistory [PackAPunch] [player] [true]
Intersect [ray] [vRel:0,0,0] [vRel:30,0,0] [mobs]
HasHistory [Ammo] [player] [true]
Then
Context [target]
Health [-75]

Elseif

HasHistory [PackAPunch] [player] [false]
Intersect [ray] [vRel:0,0,0] [vRel:30,0,0] [mobs]
HasHistory [Ammo] [player] [true]
Then
Context [target]
Health [-25]

Elseif
HasHistory [Ammo] [player] [false]
Then
Notify [out of ammo...] [Local] [r,g,b]


Use this as the script for the gun and then if they pack a punch, the gun does more damage, if they don't, then it does regular damage
i plan on doing something like that trust me




Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6650
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: local/global skills q
« Reply #5 on: June 19, 2016, 09:55:46 AM »
HasHistory [PackAPunch] [player] [true]
Intersect [ray] [vRel:0,0,0] [vRel:30,0,0] [mobs]
HasHistory [Ammo] [player] [true]

Tip of the week:

Do the Intersect test last, because it requires a network ping on multiplayer games, so it's wasteful to do that if any following tests fail (such as if they have no Ammo).

HasHistory [PackAPunch] [player] [true]
HasHistory [Ammo] [player] [true][/quote]
Intersect [ray] [vRel:0,0,0] [vRel:30,0,0] [mobs]

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: local/global skills q
« Reply #6 on: June 19, 2016, 04:13:46 PM »
HasHistory [PackAPunch] [player] [true]
Intersect [ray] [vRel:0,0,0] [vRel:30,0,0] [mobs]
HasHistory [Ammo] [player] [true]

Tip of the week:

Do the Intersect test last, because it requires a network ping on multiplayer games, so it's wasteful to do that if any following tests fail (such as if they have no Ammo).

HasHistory [PackAPunch] [player] [true]
HasHistory [Ammo] [player] [true]
Intersect [ray] [vRel:0,0,0] [vRel:30,0,0] [mobs]
[/quote]

Question, Is the order of operation impactful for any conditionals other than intersect?

Even if the difference is minute, It would be nice to know.

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

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6650
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: local/global skills q
« Reply #7 on: June 19, 2016, 10:24:26 PM »
Question, Is the order of operation impactful for any conditionals other than intersect?
Generally not enough to worry about.

The only thing I'd mention, is if you are doing any commands that are using text substitution, in a tight loop, then do them last as well (but before any Intersect commands, always do Intersect last).

And if you wanted to get really fussy, then do any commands that require string keys, like HasHistory, after commands that don't. This won't effect execution speed so much, but will reduce the number of garbage collections invoked by the C# run time, which cause multi-frame stalls.

.ok

  • Supreme Member
  • *****
  • Posts: 2212
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site 2 years on site Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site
    • View Profile
    • Awards
Re: local/global skills q
« Reply #8 on: June 19, 2016, 10:37:59 PM »
Question, Is the order of operation impactful for any conditionals other than intersect?
Generally not enough to worry about.

The only thing I'd mention, is if you are doing any commands that are using text substitution, in a tight loop, then do them last as well (but before any Intersect commands, always do Intersect last).

And if you wanted to get really fussy, then do any commands that require string keys, like HasHistory, after commands that don't. This won't effect execution speed so much, but will reduce the number of garbage collections invoked by the C# run time, which cause multi-frame stalls.
could u give a few examples




Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: local/global skills q
« Reply #9 on: June 20, 2016, 08:01:33 AM »
Question, Is the order of operation impactful for any conditionals other than intersect?
Generally not enough to worry about.

The only thing I'd mention, is if you are doing any commands that are using text substitution, in a tight loop, then do them last as well (but before any Intersect commands, always do Intersect last).

And if you wanted to get really fussy, then do any commands that require string keys, like HasHistory, after commands that don't. This won't effect execution speed so much, but will reduce the number of garbage collections invoked by the C# run time, which cause multi-frame stalls.
could u give a few examples

"If
  IsBlock [prel:0,-1,0] [Grass] [True]
  HasHistory [Null] [<] [2147483747]
  HasHistory [Null] [>] [History:Null2]
  Intersect [frustum] [vrel:0,0,0] [vrel:20,0,0] [90] [mobs]
Then
  SetBlock [prel:0,-1,0]
  Notify [[gamertag] of [clan] with [clanhistory:Gold] gold in your clan, You have placed the grass block underneath you underneath the mob within 20 blocks of you and in a 90 degree fov because [SysHistory:Null] is less than 2147483647, And greater than [History:Null2]]
  Context [Player] [Target]
  SetBlock [prel:0,-1,0]"



Is that good enough for you?

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

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6650
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: local/global skills q
« Reply #10 on: June 20, 2016, 09:03:21 AM »
I can't find/remember any conditional commands that utilize text substitution, so we can ignore that.

if
   IsEquipped [left] [Sword] => no string - do first
   HasHistory [Tank] [player] => uses a string "Tank" - do next
   Intersect => round trip net ping - do last

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: local/global skills q
« Reply #11 on: June 20, 2016, 09:08:04 AM »
I can't find/remember any conditional commands that utilize text substitution, so we can ignore that.

if
   IsEquipped [left] [Sword] => no string - do first
   HasHistory [Tank] [player] => uses a string "Tank" - do next
   Intersect => round trip net ping - do last


Does history substitution not count?

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

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6650
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: local/global skills q
« Reply #12 on: June 20, 2016, 11:42:06 AM »
Does history substitution not count?
Yes that counts, so an example would be:

if
   IsEquipped [left] [Sword] => no string - do first
   HasHistory [Tank] [player] => uses a string "Tank" - do next
   HasHistory [Tank [coord]] [player] => uses text substitution "[coord]" - do next
   Intersect => round trip net ping - do last
   Loop


Keeping in mind, apart from the Intersect command, if the scripts with these commands are only executing every so often, like after a player hits a button or some other infrequent trigger, then it's not something to worry about. Only consider the efficiency from ordering if the script is looping on a short delay, say 100 ms or less.
« Last Edit: June 20, 2016, 11:47:09 AM by Craig »