• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Mount

Status
Not open for further replies.
Level 9
Joined
Apr 7, 2010
Messages
480
  • Horse
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Horse
    • Actions
      • Unit - Create 1 Horse for (Owner of (Buying unit)) at (Position of (Buying unit)) facing (Position of (Buying unit))
      • Set Horse = (Last created unit)
      • Set Villager = (Buying unit)
      • Animation - Change Villager flying height to 40.00 at 0.00
      • Trigger - Turn on Horse1 <gen>
  • Horse1
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit - Move Horse instantly to (Position of Villager), facing (Facing of Villager) degrees
QUESTIONS :
how do i set the unit's movement to flying only after buying the horse?
how do i set the villagers walking animation to stand?
how do i make the horse play walking animation when villager is moving
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
- You must add these two lines before you set the flying height:

  • Unit - Add Crow Form to (Buying unit)
  • Unit - Remove Crow Form from (Buying unit)
You should also change the 0.00 value to something very high if you want the height change to be instant. The 0.00 value means how many distance units it moves up per second.

====================

- Use this:

  • Animation - Play (Buying unit)'s stand animation
====================

- This can be complicated, rather just do it like you already are. However, your Horse1 trigger leaks a location. Fix it like this:

  • Horse1
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Point = (Position of Villager)
      • Unit - Move Horse instantly to Temp_Point, facing (Facing of Villager) degrees
      • Custom script: call RemoveLocation(udg_Temp_Point)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
- You must add these two lines before you set the flying height:

  • Unit - Add Crow Form to (Buying unit)
  • Unit - Remove Crow Form from (Buying unit)

http://www.hiveworkshop.com/forums/tutorial-submission-283/how-properly-use-crow-form-202571/

You should also change the 0.00 value to something very high if you want the height change to be instant. The 0.00 value means how many distance units it moves up per second.

0 is instant.

  • Animation - Play (Buying unit)'s stand animation

Plays the animation only once. I'd use
  • Custom script: call SetUnitAnimationByIndex(unit, index)
which keeps looping the anim until the unit is issued an order or given a new anim. You need to find the index, they are different for each model.

  • Horse1
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Point = (Position of Villager)
      • Unit - Move Horse instantly to Temp_Point, facing (Facing of Villager) degrees
      • Custom script: call RemoveLocation(udg_Temp_Point)

Moving unit instantly breaks the anim since it issues a stop order. I'd use
  • Horse1
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set Unit = your hero
      • Set Horse = your horse
      • Custom script: call SetUnitX(udg_Horse, GetUnitX(udg_Hero))
      • Custom script: call SetUnitY(udg_Horse, GetUnitY(udg_Hero))
I as wactually creating a riding system once, but didn't finish it. Now could be a good time to do so.
 
Level 9
Joined
Apr 7, 2010
Messages
480
+rep to Mr bean987, then again. still need to spread some more for Maker.

the third question wasn't solved

Custom script: call SetUnitX(udg_Horse, GetUnitX(udg_Hero))
Custom script: call SetUnitY(udg_Horse, GetUnitY(udg_Hero))
i still need to add the custom script for facing angle.
 
Status
Not open for further replies.
Top