- Joined
- Jan 13, 2008
- Messages
- 559
Hi, I am trying to rotate objects around the unit in the center and move them closer and closer towards it. This works fine except for the very first spawned object and I don't understand why. The first object seems to spawn not with an offset of 600 but more? i really dont know.
Any help is appreciated. Thanks
Any help is appreciated. Thanks
Code:
Evil Sorcerer Shots Cast
Events
Time - Every 4.00 seconds of game time
Conditions
Or - Any (Conditions) are true
Conditions
(evil sorcerer area <gen> contains player_hero[1]) Equal to True
(evil sorcerer area <gen> contains player_hero[0]) Equal to True
(Evil Sorcerer 0059 <gen> is alive) Equal to True
Actions
Custom script: set bj_wantDestroyGroup=true
Animation - Play Evil Sorcerer 0059 <gen>'s stand channel animation
Sound - Play CharmTarget1 <gen>
For each (Integer A) from 0 to 8, do (Actions)
Loop - Actions
Set z_leakRemove_point = (Position of Evil Sorcerer 0059 <gen>)
Unit - Create 1 dummy_evilSorcerer_shots for Player 11 (Dark Green) at (z_leakRemove_point offset by 600.00 towards (270.00 + ((Real((Integer A))) x 40.00)) degrees) facing ((Angle from (Position of (Last created unit)) to (Position of Evil Sorcerer 0059 <gen>)) + 90.00) degrees
Unit - Add a 5.50 second Generic expiration timer to (Last created unit)
Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_z_leakRemove_point)
Code:
Move shots
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units of type dummy_evilSorcerer_shots) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 2.00 towards (Facing of (Picked unit)) degrees)
Unit - Make (Picked unit) face ((Angle from (Position of Evil Sorcerer 0059 <gen>) to (Position of (Picked unit))) + 120.00) over 0.00 seconds