| 02-23-2007, 08:25 AM | #1 |
I'm using a spell based on wind walk to generate this, but for some reason, it sometimes creates it with an offset. Could anyone tell me how to remove the offset? Trigger: The main thing I want is that the thing pops up at the position of the unit, rather than having to deal with some random point, |
| 02-23-2007, 08:32 AM | #2 |
It may be moved by pathing intersection. |
| 02-23-2007, 08:39 AM | #3 | |
Quote:
Turn the laser bolt collision to 0. |
| 02-23-2007, 08:51 AM | #4 |
Collision is zero, and the unit flies... And I, me being me, don't know what pathing intersection is... although it feels like the key to all my problems... |
| 02-23-2007, 09:45 AM | #5 |
Make 3 variables: X (Real), Y (Real), and TempPoint (Point), and do these actions: Trigger: Actions
![]() Set TempPoint = Position of (Triggering Unit)
![]() Custom script: set udg_X = GetLocationX(udg_TempPoint)
![]() Custom script: set udg_Y = GetLocationY(udg_TempPoint)
![]() Unit - Create 1 Laser Bolt for (Owner of (Triggering unit)) at (TempPoint) facing (Facing of (Triggering unit)) degrees
![]() Custom script: call SetUnitX(GetLastCreatedUnit(), udg_X)
![]() Custom script: call SetUnitY(GetLastCreatedUnit(), udg_Y)
![]() Custom script: call RemoveLocation(udg_TempPoint) |
| 02-23-2007, 10:04 AM | #6 |
Trigger: Actions
![]() Set TempPoint = (Position of (Triggering unit))
![]() Custom script: set udg_X = GetLocationX(udg_TempPoint)
![]() Custom script: set udg_Y = GetLocationY(udg_TempPoint)
![]() Unit - Create 1 Laser Bolt for (Owner of (Casting unit)) at TempPoint facing (Facing of (Casting unit)) degrees
![]() Custom script: call SetUnitX(GetLastCreatedUnit(TempPoint), udg_X)
![]() Custom script: call SetUnitY(GetLastCreatedUnit(TempPoint), udg_Y)
![]() Custom script: call RemoveLocation(udg_TempPoint)It rejects the set udg_X/Y and call SetUnitX/Y custom script lines... ![]() |
| 02-23-2007, 10:22 AM | #7 | ||||||||||||
Did you capitalize your variables? JASS (the custom script part) is Case-Sensitive. Thusm, "X" is not the same as "x". Also, the "udg_"Prefix is not part of the variable name; it's just a prefix that you have to add the the code (though it's actually a little more complicated than that). Have your variables section look like this: Variables:
|
| 02-23-2007, 10:30 AM | #8 |
Does the windwalk spell you're using have a fade time of 0? One of the durations will be 2.00 or something small like that, make sure it's set to 0, as Windwalk's collision removal doesn't occur until it's fully transformed. Also, i suggest you give the lazer bolt a small collision (1 or so) and make it a ground unit, flying units have funky height problems every now and then. |
| 02-23-2007, 08:16 PM | #9 |
Wind Walk has no duration, so I don't think it'd exactly change it... Do hover units climb up cliffs and go in to retarded angles? Um... the main bug may be in the Laser Unit, because it appears that it doesn't want to spawn over unbuildable tiles, so it'll always spawn on top of grass and not the white and purple marble in the central area... A few more details on the unit (after a tiny tweak of movement type): It's been changed to be considered a ward, it's based off a Wisp, targeted as a ward, has movement type hover, movement speed 0, and Ghost for pathlessness. This bug also occurred when I substituted the trigger and spell with a Feral Spirit based spell... |
