• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help on cinematic..

Status
Not open for further replies.
Level 5
Joined
Jun 22, 2008
Messages
121
The only problem on me is..HOW DO I MAKE THE UNIT MOVE FORWARD BACKWARD LEFTWARD RIGHTWARD EASTWARD SOUTHWARD NORTHWARD WESTWARD UPWARD DOWNWARP LEFTWARD RIGHTWARD ?
 
Level 14
Joined
Apr 21, 2007
Messages
1,465
Do you mean making the unit move as in walk to a region or just teleport to a region?

If you mean move to region you just use the action:

  • Actions
    • Unit - Order YourUnit to Move To (Center of (YourRegion))
If you mean teleport to a region:

  • Actions
    • Unit - Move YourUnit instantly to (Center of (YourRegion))
 
Level 12
Joined
Mar 26, 2005
Messages
790
if you want to move unit "FORWARD BACKWARD LEFTWARD RIGHTWARD" you have to use unit's facing angle,

EASTWARD SOUTHWARD NORTHWARD WESTWARD, just move unit to position of unit +- some points in X or Y coordinates

UPWARD DOWNWARP-unit must be flying unit, then change the flyingh height, there is an action for it
 
Level 14
Joined
Apr 21, 2007
Messages
1,465
Ah, now I get it.

If you want to make the unit move North, East, West, South do the following action:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by (X, Y))
Now, you must replace the XX with the appropriate value. If you want him to go north you need to set the second coordinate, Y, to a positive value, so the action would go something like this:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by (0.00, 256.00))
If you want your unit to go south you need to assign Y with a negative value:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by (0.00, -256.00))
If you want him to go east you assign the other coordinate, X, with a positive value:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by (256.00, 0.00))
And if you want him to go west you assign X a negative value:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by (-256.00, 0.00))
-------------------------------------------------------------------------------------------

If you want your unit to go up or down you need to, as Restor said, change the unit to be a flying unit(Let's say with a default flying height of 500) and put the action for his descent:

  • Animation - Change No unit flying height to 200 at 100.00
This will reduce the unit's flying height to 200 at the rate of 100 units per second meaning that he will reach this flying height in (starting height-new height)/rate meaning (500-200)/100 = 3 seconds.

If you want to increase the height to let's say 1000:

  • Animation - Change No unit flying height to 1000 at 100.00
This time it will take him 5 seconds to reach the desired height(presuming he started from his default height of 500).

-------------------------------------------------------------------------------------------

Now, if you want to make the unit move forwards you need to mess around with the following action:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by 256.00 towards ((Facing of (YourUnit)) + 0.00) degrees)
This will make him move by 256 forward.
If you want him to move backward all you need to do is modify the action by changing the angle:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by 256.00 towards ((Facing of (YourUnit)) + 180.00) degrees)
If you want him to move left or right simply change the above +180.00 to either +90.00 for left and +270.00 for right.

Hope this helps.
 
Level 5
Joined
Jun 22, 2008
Messages
121
Ah, now I get it.

If you want to make the unit move North, East, West, South do the following action:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by (X, Y))
Now, you must replace the XX with the appropriate value. If you want him to go north you need to set the second coordinate, Y, to a positive value, so the action would go something like this:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by (0.00, 256.00))
If you want your unit to go south you need to assign Y with a negative value:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by (0.00, -256.00))
If you want him to go east you assign the other coordinate, X, with a positive value:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by (256.00, 0.00))
And if you want him to go west you assign X a negative value:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by (-256.00, 0.00))
-------------------------------------------------------------------------------------------

If you want your unit to go up or down you need to, as Restor said, change the unit to be a flying unit(Let's say with a default flying height of 500) and put the action for his descent:

  • Animation - Change No unit flying height to 200 at 100.00
This will reduce the unit's flying height to 200 at the rate of 100 units per second meaning that he will reach this flying height in (starting height-new height)/rate meaning (500-200)/100 = 3 seconds.

If you want to increase the height to let's say 1000:

  • Animation - Change No unit flying height to 1000 at 100.00
This time it will take him 5 seconds to reach the desired height(presuming he started from his default height of 500).

-------------------------------------------------------------------------------------------

Now, if you want to make the unit move forwards you need to mess around with the following action:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by 256.00 towards ((Facing of (YourUnit)) + 0.00) degrees)
This will make him move by 256 forward.
If you want him to move backward all you need to do is modify the action by changing the angle:

  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by 256.00 towards ((Facing of (YourUnit)) + 180.00) degrees)
If you want him to move left or right simply change the above +180.00 to either +90.00 for left and +270.00 for right.

Hope this helps.

most helpful post..Thanks for the help !!..
 
Level 8
Joined
Mar 25, 2005
Messages
409
Actually, that will leak.

What you need to do is make a new variable called "TempPoint" which you then destroy.
So per example this:
  • Unit - Order YourUnit to Move To ((Position of YourUnit) offset by (X, Y))
Should look like this:
  • Set TempPoint = ((Position of YourUnit) offset by (X, Y))
  • Unit - Order YourUnit to Move To (TempPoint)
  • Custom script - call RemoveLocation( udg_TempPoint )
Get it? If you didn't check out Cubasis tut (Getting Rid Of Memory Leaks In GUI - Wc3campaigns), it probably explains things better than me.
 
Status
Not open for further replies.
Top