• 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] Why isn't this working correctly?

Status
Not open for further replies.

Br0

Br0

Level 4
Joined
May 4, 2012
Messages
102
It is a system to hold a unit and add an ability for each unit inside the transport like for example phoenix fire then level it up after the first unit is inside

[trigger=1]
Events
Unit - A unit Is loaded into a transport
Conditions
(Unit-type of (Loading unit)) Equal to Footman
Actions
Custom script: local unit udg_u = GetTransportUnit()
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
o999[(Custom value of (Triggering unit))] Equal to 0
Then - Actions
Unit - Add Phoenix Fire to u
Set o999[(Custom value of (Triggering unit))] = 1
Wait until (((Triggering unit) is loaded into u) Equal to False), checking every 1.00 seconds
Set o999[(Custom value of (Triggering unit))] = (o999[(Custom value of (Triggering unit))] - 1)
Unit - Remove Phoenix Fire from u
Custom script: set udg_u = null
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
o999[(Custom value of (Triggering unit))] Equal to 1
Then - Actions
Unit - Increase level of Phoenix Fire for u
Set o999[(Custom value of (Triggering unit))] = 2
Wait until (((Triggering unit) is loaded into u) Equal to False), checking every 1.00 seconds
Set o999[(Custom value of (Triggering unit))] = (o999[(Custom value of (Triggering unit))] - 1)
Unit - Decrease level of Phoenix Fire for u
Custom script: set udg_u = null
Else - Actions




[/trigger]

[trigger=2]
Events
Unit - A unit enters (Playable map area)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
indexer09 Greater than 8000
Then - Actions
Set indexer09 = 0
Else - Actions
Set indexer09 = (indexer09 + 1)
Unit - Set the custom value of (Triggering unit) to indexer09





[/trigger]
 

Attachments

  • trigger.w3x
    17.5 KB · Views: 53
Last edited:

Br0

Br0

Level 4
Joined
May 4, 2012
Messages
102
If you aren't going to help then why bother posting?

I explained what it is suppose to do, I explained how I did it, I posted my code. I did explain what it actually "do" does.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
If you aren't going to help then why bother posting?

I explained what it is suppose to do, I explained how I did it, I posted my code. I did explain what it actually "do" does.
No, you're the one who is wrong right now.
He is trying to help you (he actually pointed out 1 inefficiency), but you're not letting him. Very counterproductive actually.

You did not explain the problem, you just said "this isn't working".
If you want a quick and accurate response, then say what the trigger actually does wrong (aside from saying what it's supposed to do).

Some people are trying to solve the problems of strangers in their free time without any pay whatsoever, might as well help them a little bit don't you think?


But enough of that, just be nice to people.
Here are a few of my thoughts:

First of all, I find your variable names really confusing ("o999"? "indexer09"?).
Well, there's probably some logic behind that.

  • Set o999[(Custom value of (Triggering unit))] = 1
  • Wait until (((Triggering unit) is loaded into u) Equal to False), checking every 1.00 seconds
  • Set o999[(Custom value of (Triggering unit))] = (o999[(Custom value of (Triggering unit))] - 1)
I do not understand what you're trying to achieve here.
There is not actual wait because it all happens instantly.
So "o999[Value]" will always be 0 after this.

If this is true (I've checked this, it does seem to be true), then the entire trigger is useless.
Phoenix Fire is removed instantly and "o999[Value]" is 0. Nothing happens.
 
Status
Not open for further replies.
Top