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

[Trigger] How would this be done?

Status
Not open for further replies.

Deleted member 177737

D

Deleted member 177737

Hey, I'm currently working on a little SRPG hero selection system and I would like to add a little cosmetic feature but I'm not exactly sure how.

I'm trying to make it so that when the player holds down the left arrow key the hero turns left, when the player holds down the right arrow key the hero turns right, and when either the left or right is released the hero stops spinning. I also want to include a trigger to reset the hero to his original facing.

This was my test trigger which woulden't work because the hero is using a "Maximum Pitch Angle of -270" so when the facing changes he just spins around in a circle while staring at the camera.
  • Turn Hero Left
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
    • Conditions
    • Actions
      • Unit - Make Hero face ((Current turn speed of Hero) - 5.00) over 0.10 seconds
      • Wait 0.01 seconds
      • Trigger - Run (This trigger) (checking conditions)
I need to find a way to make him spin <-> instead of in a circle.


Edit:

Here is what it looks like so far, this might help you figure out what I'm talking about with what direction the hero is supposed to spin.
 
Last edited by a moderator:
Level 6
Joined
Aug 16, 2007
Messages
213
You'd need two triggers for this... I'm to lazy to explain, so I'll just make you the trigger.

Amm.. just a question, does this run for some specific unit or it should work for multiple units? If so You'll just need to add some sort of condition.

Well I was to lazy to make variables for both triggers, so i used the same, you should fix that to make it work smoother ;)

press left- turns one way
press right - turns the other way
press up ressets the camera

Hope this is helpful.
 

Attachments

  • TurnUnit.w3x
    12.6 KB · Views: 50
Last edited:

Deleted member 177737

D

Deleted member 177737

It is helpful for most of the trigger, but I'm trying to get the unit to spin on the other axis. (This is hard to explain...)

Your guy is spinning around in a circle on the Z-axis, I need my hero to spin on the X or Y-axis (I'm pretty sure its X-axis).
 

Attachments

  • example.jpg
    example.jpg
    85.5 KB · Views: 83

Deleted member 177737

D

Deleted member 177737

I get what your saying but I cant do that because the interface, floating text, and background wouldn't show properly. The whole problem is trying to figure out how to use the other axis =/
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
1st: your trigger will loop til the end of world. (You are running it after each end when there is no conditions!).

1. Trigger - Run (This trigger) (checking conditions)

its mean its repeat only if arrow key is pressed

just a question, what it do the Caster_SetZAngle?

(a ideea, u can lock ur unit body to a unit what could rotate around ur hero, idk if work but its kinda different the make unit face angle but it also crap since leggs dont moveing (i tryed, but exclude that its work how u want :D) )
 
Last edited:

Deleted member 177737

D

Deleted member 177737

1st: your trigger will loop til the end of world. (You are running it after each end when there is no conditions!).

2nd: Why don't you lock camera on ground?


The trigger at the top was meant to loop so I could see if the unit would rotate properly. (It has nothing to do with how it will be triggered after I figure out how to rotate the unit the way I want)

The camera is locked on the ground in another trigger.

I still don't think I'm explaining how I want this to work properly... I've attached another picture that will hopefully show you what I want it to do.


EDIT: Just saw the post above with http://www.thehelper.net/forums/showthread.php/145620-How-to-set-Yaw-and-Pitch-for-a-Unit going to see if it will work.
EDIT2: That method won't work, I don't plan on messing with any of the models I'm using and I cant use Jass.


I think it will be simplier to rotate camera and adjusting texttags positions

That would mean micro adjusting every doodad, dummy unit, and floating text. If this means doing that I'll just leave it out.
 

Attachments

  • example2.jpg
    example2.jpg
    153.7 KB · Views: 69
Level 9
Joined
Nov 19, 2011
Messages
516
I got alredy this. Only thing that I don't know is how to change camera angle. But it looks like its rotateing like you wanted. Only pin it to right events and find someone whose native language is english. Maby he would know how to change angle.
 

Attachments

  • camera_2.w3x
    16.2 KB · Views: 91

Deleted member 177737

D

Deleted member 177737

I got alredy this. Only thing that I don't know is how to change camera angle. But it looks like its rotateing like you wanted. Only pin it to right events and find someone whose native language is english. Maby he would know how to change angle.

All that is happening on your map is that the camera is rotating. I want the unit to rotate not the camera.
 

Deleted member 177737

D

Deleted member 177737

Now it works like you wish and is more simple. Still don't know how to change camera angle to pin it on center of START<gen> with faceing on unit face (not feet).


It's spinning exactly the same as the other maps above, I neeed it to spin on the other axis not go around in circles.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
So I don't understand you. Do you want to see his feet from ground??

I see what he did, (i hope) he rotated the model so that the Z-axis performs as the X-axis

@Major - On the testmap, the footman would appear to be doing a backflip
 
Status
Not open for further replies.
Top