• 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] Make a model "Breathe" Need Help

Status
Not open for further replies.
Level 11
Joined
Jun 21, 2007
Messages
505
Hi, I'm making an FPS and I have a marine's model with no textures and materials that holds a minigun (as yet). The camera is put inside the invisible marine and does this:
  • Lock camera to unit
  • Events
    • Time - Every 0.01 seconds
  • Conditions
  • Actions
    • Custom script: set udg_HeroZ=GetLocationZ(udg_HeroPos)
    • Custom script: set udg_CameraZ=GetLocationZ(udg_CameraPos)
    • Camera - Set Height Offset for Player 1's camera to 120-CameraZ+HeroZ
And I want the hero, which is holding the minigun, sway up and down. I entered its minimal height in Object Editor to -9999 and it's Movement Height to 10. Here's the trigger:
  • Breathing
  • Events
    • Time - Every 0.06 seconds
  • Conditions
  • Actions
    • If Breathe_GoingUp Equal to True then do set Hero_HeightOffset = (Hero_HeightOffset + 1.00) else do if Breathe_GoingUp Equal to False then do set Hero_HeightOffset = (Hero_HeightOffset -1)
    • If Hero_HeightOffset Equal to -10.00 then do set Breathe_GoingUp Equal to True else do if Hero_HeightOffset Equal to 20.00 then do set Breathe_GoingUp Equal to False
    • Animation - Change Hero's flying height to 10+Hero_HeigthtOffset
The second trigger doesn't work at all! The height of the unit doesn't change ingame! I already did in Object Editor the unit's movement type Fly and even targeted it as Air in "Combat" section.
What is wrong with the trigger? Please help!
 
Status
Not open for further replies.
Top