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

[Solved] Camera Trigger Not working

Status
Not open for further replies.
Level 2
Joined
Aug 21, 2012
Messages
14
Hello, I have a problem with my map, which has circle of power hero selection system, and I can't get 3rd person cam to work. Map is 4-player, I still have slots to make it 8-player one.
Here's the problem:

[trigger=My Trigger]PaladinHero
Events
Unit - A unit enters Paladin <gen>
Time - Every 0.03 seconds of game time
Conditions
Actions
Multiple functionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit - type (Entering unit)) Equal to (==) Hero selecter
Then - Actions
Unit - Create 1 Paladin for (Owner of(Entering unit)) at (Center of Starting area <gen>)facing 90.00 degrees
Unit - Explode (Entering unit)
Set PaladinHero = (Last created unit)
Else - Actions
Camera - Lock camera target for (Owner of PaladinHero)to PaladinHero, offset by (0,00 0.00) using Default rotation
Camera - Set (Owner of PaladinHero)'s camera Angle of attack to 345.00 over 0.10 seconds
Camera - Set (Owner of PaladinHero)'s camera Distance to target to 800.00 over 0.10 seconds
Camera - Set (Owner of PaladinHero)'s camera Height Offset to 125.00 over 0.10 seconds
Camera - Set (Owner of PaladinHero)'s camera Rotation to (Facing of PaladinHero) over 0.10 seconds
[/trigger]
Any Ideas? Any comments would be helpful.
 
You either need to separate the events with an if/then/else:
  • Custom script: if GetTriggerEventId() == EVENT_ID_HERE then
  • Actions here
  • Custom script: else
  • Actions Other here
  • Custom script: endif
or create two triggers. You are using event responses (Entering unit) that don't fit with the timed event - and the trigger cannot recognize what overrides what in the If/Then/Else that you have.
 
Level 2
Joined
Aug 21, 2012
Messages
14
All right, but I'm quite confused. I am somewhat new to this, could you please show what would it look like? EDIT: I mean, how would I do it with separate triggers? EDITEDIT: Never mind, I think I've figured it out. Edit: I haven't, I feel kind of dumb now, here's the problem:
  • PaladinHero
    • Events
      • Unit - A unit enters Paladin <gen>
    • Conditions
      • Actions
        • Multiple functionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions(Unit - type (Entering unit)) Equal to (==) Hero selecter
      • Then - Actions
        • Unit - Create 1 Paladin for (Owner of(Entering unit)) at (Center of Starting area <gen>)facing 90.00 degrees
        • Unit - Explode (Entering unit)
        • Set PaladinHero = (Last created unit)
        • Trigger - Turn on PaladinHeroCam<gen>
  • Else - Actions
Here's the PaladinHeroCam, which is set to Initially off:
  • Events
    • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions (copy-pasted from this trigger, same camera actions)
EDITEDIT It works now! Idk why though. Maybe I ran an old version last time?
 
Last edited:
Status
Not open for further replies.
Top