Create a free account to remove all ad content.

Author Topic:  making a cone shaped targeting effect  (Read 435 times)

0 Members and 1 Guest are viewing this topic.

Phearcia

  • Member
  • *
  • Posts: 157
    • View Profile
  • Xbox: Phearcia
making a cone shaped targeting effect
« on: September 11, 2016, 06:25:49 PM »
Var [A] = [A] + [1]

Var (x) = (view:x) * [A] + [pos:x]
Var (z) = (view:z) * [A] + [pos:z]

var (x1) = (view:x) + [.3] * [A] + [pos:x]
Var (z1) = (view:z ) + (.3) * [A] + [pos:z]

Var (x2) = [view:x] - (.3) * [A] + [pos:x]
Var [z2] = [view:z] - (.3) * [A] + [pos:z]

Var [y] = [view:y] * [a] + (pos:y) + [1]

If
 isvar (a) [=<] [3]
Then
Script (target) [vars:x,y,z]
Script (target1) [vars:x1,y,z1]
Script (target2) [vars:x2,y,z2]

For the moment the three script commands are just a single intersect command.

I'm making a script that fires out 9 orb shaped target intersects in a cone shaped pattern. It works half the time. When I face NW and SE it fires all three targeting vectors in a straight line.

Is there a way of fixing this?
« Last Edit: September 11, 2016, 07:16:07 PM by Phearcia »

Dryym

  • Supreme Member
  • *
  • Posts: 4336
  • What's yours is mine. ~TM's Resident Master Thief~
    • View Profile
  • Xbox: dryym
Re: making a cone shaped targeting effect
« Reply #1 on: September 11, 2016, 06:52:40 PM »
Is it possible that this problem you are having is related to this?
http://totalminerforums.net/index.php?topic=17784.0

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

Phearcia

  • Member
  • *
  • Posts: 157
    • View Profile
  • Xbox: Phearcia
Re: making a cone shaped targeting effect
« Reply #2 on: September 11, 2016, 07:08:46 PM »
The boomerang ordeal. I think it may actually be similar. The view x and view z vectors intersect like scissors in a way. How did you make you work around? Did you make separate scripts. It happens when the view x is at 65thru75 and -65thru-75.

Dryym

  • Supreme Member
  • *
  • Posts: 4336
  • What's yours is mine. ~TM's Resident Master Thief~
    • View Profile
  • Xbox: dryym
Re: making a cone shaped targeting effect
« Reply #3 on: September 11, 2016, 07:21:05 PM »
The boomerang ordeal. I think it may actually be similar. The view x and view z vectors intersect like scissors in a way. How did you make you work around? Did you make separate scripts. It happens when the view x is at 65thru75 and -65thru-75.

I never did make a workaround because in this case, The unintentional function of the script was cool enough to leave be.


If Craig solved the problem on the other topic where I posted pics of my script, I bet this one could be solved quite simply.

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

Phearcia

  • Member
  • *
  • Posts: 157
    • View Profile
  • Xbox: Phearcia
Re: making a cone shaped targeting effect
« Reply #4 on: September 11, 2016, 07:40:02 PM »
I think what I may do is make a script that detects the the view numbers and it's between a certain range I just increase the .3 view modifier to a .6.

Aaaand that doesn't work.
« Last Edit: September 11, 2016, 08:11:27 PM by Phearcia »