• 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.

Player Mount

Status
Not open for further replies.
Level 7
Joined
Jun 16, 2008
Messages
253
I sort of asked this question in my thread Collision Attachments, and it's in the same vein.

I want to be able to 'attach' my hero to his horse, so that when the horse goes somewhere, he is dragged along with it so to speak. His movement is locked to the horse.
Now it is important that it is literally attaching the hero, not special effects, or new created units, but the existing Hero himself.

I've already heard some suggestions, and at the moment I'm thinking it's possible to get what I want by perhaps changing collision to 0, and moving Hero to position of Horse every 0.01 seconds facing orientation etc...

I wondering if there are any better ways of achieving this? To be able to fix the hero as if he were a special effect. He will be a different unit from the horse, and both will remain basically unchanged, except that the Hero now relies on horse for movement. They can both attack seperately etc, and provides two distinct targets for the enemy.
Also stuns and the like will have the effect of knocking him off the horse.
Perhasps this could be done if I simply leave his movement 'normal' and just have it match horse speed, the horse also follows the Hero's commands. So if he is stunned, he is stopped dead in his tracks, and the horse will continue on. As soon as he is a certain distance away from horse he will automatically 'unmount' and return to normal.

Any thoughts?
 
Level 9
Joined
Apr 6, 2008
Messages
436
The 0.01 idea is the best way to do it. But I'm just a n00b who can't use jass.

They can both attack seperately etc, and provides two distinct targets for the enemy.
Any thoughts?

God THAT's hard! If he turns to attack a unit behind the horse, his legs must remain still, and his trunk and his head must turn!.. Then it can't be the same model as the hero on foot, because that version can turn even the legs, and then it can't be the same UNIT as the hero on foot, because you can't change the model of a unit with triggers. You could make a model who has an animation mounted and another on foot, but it would be fucking hard. Then when a unit is moved every 0.01 seconds it can't attack!
 
Level 7
Joined
Jun 16, 2008
Messages
253
Thus why I wanted an attachment instead, where that sort of thing shouldn't interfere.
But I wasn't very concerned about keeping orientation of legs and the like, he can spin around in the saddle if he wants as long as the gameplay works.
I think I could probably get away with a scrounged synchonised order sort of thing, with a trigger safety net so that if he is blasted off horse or stunned off, he'll revert to normal.
 
Level 7
Joined
Jun 16, 2008
Messages
253
There's a good suggestion. I hope it's workable, I'll try it and see if I run into any complaications.

Here's a cookeh!
 
Level 9
Joined
Apr 6, 2008
Messages
436
Yummm... Tuna flavour, my favourite! (I made something like that, once)
  • IF THE HORSE IS WALKING ACTIVATE MOVEMENT
    • Events
      • Unit - Unit receives an order whit a point as target
    • Conditions
      • (Triggering unit) Equal to HORSE
      • And - All (Conditions) are true
        • Conditions
          • ((Region Centered at (Position of (Triggering Unit)) with size (50.00, 50.00)) contains HERO) Equal to TRUE
    • Actions
      • Trigger - Turn on MOVEMENT
      • Wait Until (Current Order of (Triggering Unit)) Equal to (Order(<Empty String>)), checking every 0.10 seconds
      • Trigger - Turn off MOVEMENT
  • IF THE HORSE IS WALKING ACTIVATE MOVEMENT 2
    • Events
      • Unit - Unit receives an order whit an object as target
    • Conditions
      • (Triggering unit) Equal to HORSE
      • And - All (Conditions) are true
        • Conditions
          • ((Region Centered at (Position of (Triggering Unit)) with size (50.00, 50.00)) contains HERO) Equal to TRUE
    • Actions
      • Trigger - Turn on MOVEMENT
      • Wait Until (Current Order of (Triggering Unit)) Equal to (Order(<Empty String>)), checking every 0.10 seconds
      • Trigger - Turn off MOVEMENT

  • MOVEMENT
    • Events
      • Time - Every 0.01 seconds of game-time
    • Conditions
    • Actions
      • Unit - Move HERO instantly to (position of HORSE) facing (Facing of HORSE) degrees
 
Status
Not open for further replies.
Top