HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Problem

09-17-2006, 10:46 PM#1
weedcraft
Ok I've got two triggers, one that slides the unit fast over ice and slow over lava and one that faces the unit to a direction to be turned to. For some reason my unit is not facing the point any more this trigger has worked befor but all the sudden it stopped I don't know why or what but here are the triggers

Trigger:
SlideTerrianIce
Collapse Events
Time - Every 0.03 seconds of game time
Conditions
Collapse Actions
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
Set Position = (Position of Slider[(Integer A)])
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Terrain type at Position) Equal to Northrend - Ice
Collapse Then - Actions
Set Position1 = (Position offset by 15.00 towards (Facing of Slider[(Integer A)]) degrees)
Animation - Play Caster's spell channel animation
Unit - Move Slider[(Integer A)] instantly to Position1
Custom script: call RemoveLocation(udg_Position1)
Collapse Else - Actions
Do nothing
Custom script: call RemoveLocation(udg_Position)
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
Set Position = (Position of Slider[(Integer A)])
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Terrain type at Position) Equal to Dungeon - Lava
Collapse Then - Actions
Set Position1 = (Position offset by 10.00 towards (Facing of Slider[(Integer A)]) degrees)
Animation - Play Caster's spell channel animation
Unit - Move Slider[(Integer A)] instantly to Position1
Custom script: call RemoveLocation(udg_Position1)
Collapse Else - Actions
Do nothing
Custom script: call RemoveLocation(udg_Position)


Trigger:
SlideTurnIceLava
Collapse Events
Unit - A unit Is issued an order targeting a point
Conditions
Collapse Actions
Set Position2 = (Target point of issued order)
Set Position3 = (Position of (Triggering unit))
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Collapse Or - Any (Conditions) are true
Collapse Conditions
(Terrain type at (Position of Slider[(Integer A)])) Equal to Northrend - Ice
(Terrain type at (Position of Slider[(Integer A)])) Equal to Dungeon - Lava
Collapse Then - Actions
Unit - Make (Triggering unit) face Position2 over 0.00 seconds
Collapse Else - Actions
Do nothing
09-18-2006, 03:23 PM#2
zeroXD
Dont know what should be your problem, are you sure you are not using the variables somewhere else?

One more thing, is this supposed to keep on forever? Because it does...
09-18-2006, 03:28 PM#3
The)TideHunter(
Quote:
Originally Posted by zeroXD
One more thing, is this supposed to keep on forever? Because it does...

Not quite, it stops once the unit is off ice or lava.
Although i dont see any problems either, and it uses the variables instantly without waits, so there would be no conflict with other triggers.
09-18-2006, 03:36 PM#4
zeroXD
Yes, it stops when off from ice or lava (would propably look like shit when it comes with a speed at 15/0.03 sec and just stop), but else it keeps on forever.
But i think the problem is the unit starts sliding too early (unit - make unit face angle over 0.00 seconds takes a bit longer than 0.00 seconds...)
If you try using a boolean and let the unit wait 0.03 seconds before sliding i think he will slide the right way.
09-18-2006, 03:47 PM#5
The)TideHunter(
Instead of using SetUnitFacingTimed, which is in GUI, use SetUnitFacing, which dosent need a time to imput, it does it instantly.

Collapse JASS:
native          SetUnitFacing       takes unit whichUnit, real facingAngle returns nothing
09-18-2006, 03:53 PM#6
zeroXD
Does that work for custom script?
"call SetUnitFacing(MyUnit, 90)" as an excample?
09-18-2006, 03:57 PM#7
The)TideHunter(
Quote:
Originally Posted by zeroXD
Does that work for custom script?
"call SetUnitFacing(MyUnit, 90)" as an excample?

Yes it works great.
Your example will work.

EDIT: Remember, your "90" has no decimal point, and it needs one or you will get a error, so change it to 90. if your going to use it.
09-18-2006, 04:05 PM#8
zeroXD
Okay... I got some spell based on aerial shackles that swings the target around the caster and throws it away if you stop channeling or duration ends. Looks shit whith the normal GUI facing stuff.

Trigger:
Custom Script: call SetUnitFacing(MyUnit, 90.00)
Should work fine?
09-18-2006, 05:09 PM#9
The)TideHunter(
Yes it would work fine.
09-18-2006, 05:47 PM#10
zeroXD
(Damn getting off-topic now :p)
Use the script me and TideHunter was disgussing instead of the unit - face angle action, and use a temporary real variable for angle.