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

Changing a unit's pitch

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
I have a car game in which the car can run up a ramp and then fly through the air before landing.

Problem: as soon as the car becomes airborne it resets to a flat pitch (as if it were standing on flat terrain). This looks odd because the car appropriately pitches up while driving up a hill.

I swear there was a command to set the pitch of an actor before (I haven't programmed in about 9 months) but I can't find it now. It didn't work before anyway, but I hadn't tried everything yet.

Does anyone know what to do here?
 
Level 6
Joined
Apr 15, 2012
Messages
205
Are you making the car fly with behaviors, modify unit or the launch missile effect? I personally recommend the Launch Missile effect because it's very customizable.
 
Level 14
Joined
Aug 30, 2004
Messages
909
I'm sorry, i should have given more information.

I actually gave up on the data editor; I found it far too confusing. So I've been using triggers for about everything. I have a repeat trigger for moving the car, I detect the height of its current location and the height of the location it's about to move to, and if it's much lower than the car starts flying and I adjust the height of the car with the trigger.

I'd be very happy to use the esteemed Dr. Super Good's trigger idea...

[edit]

I found the action Super Good is referring to. It does not appear to work when the unit moves however. I'll do some more play testing and come back with what I find.

Thanks all.
 
Last edited:
Level 14
Joined
Aug 30, 2004
Messages
909
I played around with the action some more. The major limitations are these:

The action will not work if the unit is moving either by itself or with the "Move Unit" action. You also can't use it with "Make Unit Face Angle".

I've tried sending the rotate message in the same triggers after making the unit face an angle or moving it, and resending the message every .0625 seconds but that doesn't work either.

In short, it looks like what I'm trying to do is currently impossible. It's not game breaking exactly, but it's really annoying. Maybe they'll fix it in the future.
 
Level 9
Joined
Dec 21, 2006
Messages
490
what's so confusing about the data editor? if you need help there ask for it. in in my opinion data solutions are more effient than triggers and even less error prone.
a behavior can be used to set the height, with validators you can even check the speed and therefore use different behaviors...
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
in in my opinion data solutions are more effient than triggers and even less error prone.
Data is great for mechancily simple things. Mechancily complex things are better with triggers.

Mixing the two is highly effective. Want a skill that chain fires nukes randomly throughout an area? With data alone that is impossible. With triggers alone you are looking at a lot of messy threads. Combine the two by using a trigger enhanced effect to use the nuke effect randomly (which triggers have no problem doing) and you get a high quality result very efficiently.
 
Level 14
Joined
Aug 30, 2004
Messages
909
Hide the unit's actual actor and use a dummy actor instead. Maybe it is only a problem if the unit is moving (and not if an actor is moved).

That is an interesting idea, thanks. I'll put it in the file and come back to it. I have a lot to do and that sounds like something that would complicate my map (making all the main units invisible but with dummy actors).

You are a clever man.
 
Status
Not open for further replies.
Top