# lighting efects and units

Status
Not open for further replies.

#### snz.chaos

Level 3
i am working on a spell wich will create an lighting barrier in an 500 radius around the point. but i want to know how to block units from passing through the barrier.and also want some dps in very high speed.also want know how to trigger lighting effects for the "eye candy". i don't know triggering very well and have one week on world editor. so IF this is to basic don't go angry on me people

#### Maker

Level 37
It is not that basic spell, that can be difficult for beginners

You could create a dummy unit to represent the instance of the spell.

Periodically pick units within a range of the dummy. The picking range should be just a bit longer (around 30 distance units) than the actual barrier's width.

If the picked unit is farther away than the barrier's range, move if away from the barrier, just a bit like 10 distance units. If the unit is closer than the barrier but stll very close to the barrier, move it towards the center.

So there are three radii, A, B and C. A is the radius of the barrier. The barrier should have a tolerance, a width. We will call it x. B is A-x, C is A+x.

If a unit is between A and C, move it away from the barrier. If it is between A and B, move it towards the center of the barrier.

#### snz.chaos

Level 3
let me see what maker said...

move units in and out you mean:

• every 0.1 seconds of game
• pick every unit within 500 of InstanceUnit and do (actions):
this didn't looks how i expected to but you should be understanding
how to edit the direction the unit i will move?
i mean if its coming from right of the spell i should move it to the left and the counter to left ins't it?
but how am i supposed to do that? negate the value of facing angle of unit?

Last edited:
Status
Not open for further replies.

Replies
0
Views
618
Replies
3
Views
929
Replies
2
Views
577
Replies
0
Views
516
Replies
3
Views
904