Instant unit movement to the targeted point

Guk

New Member
Reaction score
1
The thing i need, is to unit with 0 base movement (or any other solution to make unit unbelievable slow) to have move action ( where all icons are )
And a little help with a triger
Code:
Miovement test
    Events
        Unit - A unit Is issued an order targeting a point
    Conditions
        ((Region centered at (Position of (Triggering unit)) with size (500.00, 500.00)) contains (Rally-Point of (Triggering unit) as a point)) Equal to True
    Actions
        Set MyPoint = (Target point of issued order)
        Unit - Move (Triggering unit) instantly to MyPoint

MyPoint is point variable
So the thing about the triger, unit does not instantli travel to issued point he just runs there (thats when i give him 1 base movement , cause i cant give movement order if it's 0) , wats the problem ?
 

Evoroth

New Member
Reaction score
11
Code:
        ((Region centered at (Position of (Triggering unit)) with size (500.00, 500.00)) contains [B](Rally-Point of (Triggering unit)[/B] as a point)) Equal to True

You have to change that to (Target point of issued order).
 

Guk

New Member
Reaction score
1
Thanks, but now i have other problem,
How do i move unit to center of regeion containing point of issued order , cant find where to choose that
 

Guk

New Member
Reaction score
1
How ? in ur triger theres no event, in event options i can only make event
Unit enter spesific region
but i have too many regions to select them all, and i can;t figure the way to set variable to the region
 

Guk

New Member
Reaction score
1
Code:
s
    Events
        Time - Every 0.01 seconds of game time
    Conditions
        (No region contains MyPoint) Equal to True
    Actions
        Unit - Move (Triggering unit) instantly to (Center of No region)

didn't help a bit as i thought, i can't figure how to set variable to region if it has MyPoint in it
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Well, there's no region, no point and no triggering unit.
Pretty much the only thing that works there is the event...

The combination of posts #1 and #2 was much better.


> center of regeion containing point of issued order

That's simply "target point of issued order"... at least according to that weird condition in post #1 that is...
 

Guk

New Member
Reaction score
1
I think if i explain what im trying to do, it will help much.
The thing is that map is like board for chess each square is diferent region, unit can only move to nearby regions , that's why theres condition about how far can ur unit move,
Thats where i have no problems. But problems apear when i want the unit to move (instantly) to the center of regeon it was moved to.

I cant find option where i could select center of regeion containing point of issued order thats the problem, if i could there wouldn't be so many posts in this thread :) Maybe it;s because of WorldEdit version ?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Event:
- Map init
Conditions:
Actions:
- Set Regions[1] = Region 001 <gen>
- Set Regions[2] = Region 002 <gen>
- ...
- Set Regions[64] = Region 064 <gen>
- For each Integer A from 1 to 64
- - Set Centers[Integer A] = Center of Regions[Integer A]


How to use it:

Set Point = ... whatever you need, for example "target point of issued order"
For each Integer A from 1 to 64
- If Regions[Integer A] contains Point then
- - Unit - Move (Triggering unit) instantly to Centers[Integer A]


Where
Regions is a variable of type "region", with a check in array,
and Centers an array of type "point".
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
If you're really lucky, or actually planned for it, the regions are all the same size and perfectly aligned.
In which case you can forget them and work off coordinates instead.
 

Guk

New Member
Reaction score
1
Never worked with coordinates , so im not sure if it's possibel but only solution i can think of is make point variable in the center of first region then convert it to coordinates. then make function
x/n = z,oooooo
where *x* coordinates of point where unit stands. *n* length of 1 region. *z* number of region. *o* numbers after coma would not be needed. then
y = c+z*n
where *y* point where unit should be moved, *c* coordinates of center of first region *z* and *n* like in preveous. but i think it will just count regeons diagonaly , i don't know if u can multiply x coor but leave y coor like it was, if i could my plan would work [i gues]

BUT i think it's all retaded talk of guy who worked today to much
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top