HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

(Yet another) awkward bug

08-17-2009, 04:12 PM#1
Cheezeman
Hello again, it's Cheezeman with one of his misrable bugs again.
After failing at reciving a good answer at hive, I now turn to you to see if you guys can get it to work.
My Trigger looks like this:
Trigger:
chooseDarkApostle
Collapse Events
Unit - A unit comes within 80.00 of Circle of Power 0075 <gen>
Collapse Conditions
(Unit-type of (Triggering unit)) Equal to Hero Selector
Collapse Actions
Trigger - Turn on FallenOne <gen>
Unit - Create 1 Holy Warrior for (Owner of (Triggering unit)) at (Center of PlayerSpawnLocation[(Player number of (Owner of (Triggering unit)))]) facing 270.00 degrees
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
FLAG_RandomHero[(Player number of (Owner of (Triggering unit)))] Equal to True
Collapse Then - Actions
Hero - Create Potion of Healing and give it to (Last created unit)
Collapse Else - Actions
Do nothing
Set UNIT_Heroes[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
Special Effect - Create a special effect at (Position of UNIT_Heroes[(Player number of (Owner of (Triggering unit)))]) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
Camera - Pan camera for (Owner of (Triggering unit)) to (Center of PlayerSpawnLocation[(Player number of (Owner of (Triggering unit)))]) over 0.30 seconds
Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
Unit - Remove (Triggering unit) from the game

However, nothing seems to happen.
Yet this trigger, which it was copied from, works perfectly:
Trigger:
chooseHolyWarrior
Collapse Events
Unit - A unit comes within 80.00 of Circle of Power 0075 <gen>
Collapse Conditions
(Unit-type of (Triggering unit)) Equal to Hero Selector
Collapse Actions
Trigger - Turn on FallenOne <gen>
Unit - Create 1 Dark Apostle for (Owner of (Triggering unit)) at (Center of PlayerSpawnLocation[(Player number of (Owner of (Triggering unit)))]) facing 270.00 degrees
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
FLAG_RandomHero[(Player number of (Owner of (Triggering unit)))] Equal to True
Collapse Then - Actions
Hero - Create Potion of Healing and give it to (Last created unit)
Collapse Else - Actions
Do nothing
Set UNIT_Heroes[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
Special Effect - Create a special effect at (Position of UNIT_Heroes[(Player number of (Owner of (Triggering unit)))]) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
Camera - Pan camera for (Owner of (Triggering unit)) to (Center of PlayerSpawnLocation[(Player number of (Owner of (Triggering unit)))]) over 0.30 seconds
Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
Unit - Remove (Triggering unit) from the game


Everthing is there, the circle, the hero selector (duh), the Dark Apostle, but this doesn't work.
I tried filling it with BJDebugMsg and I came to the conclusion that the InitTrig_ isn't ran, yet I tried calling it from 2 other triggers (and it's called in the "InitCustomTriggers" aswell).
And since this is an open resource, it won't use vJass (I'd like to, but this community isn't very good at triggering)

Quote:
- Circle 0002 <gen> exists
- Dark Apostle exists
- Hero Selector exists
- Using "Unit enters region" doesn't work either
- Replacing Holy Warrior with Dark Apostle in the second trigger works, while replacing Dark Apostle with Holy Warrior in the first trigger does not

-------- Edit --------
Oh yes, and here's the map. Don't judge my trigger teqchniques, I stole this unprotected version and when I'm done I'm gonna release it to battle.net and say it was all my idea from scratch.
No, but seriously, as I said this is for public use, you might just figure out what it's for.
Enfo template.w3x
Just look at the trigger in "HeroPick".
08-17-2009, 04:26 PM#2
Flame_Phoenix
If you are using GUI then you deserve to have this horrible bug xD
Anyway, let's see what it has ...
Jesus stealing a map's selector system !? Arrghhh you can get rep-- for that ...
Anyway, there were some JASS triggers on the top of the map, perhaps they were initializing variables?
Also, How do you expect GUI users to use this ? By replicating this code every time a new hero is added ?
1 - Not a good idea
2 - not efficient
3 - not modular
In conclusion this is quite a bad approach imo.

DO you have all these variables in your test map? Are you sure your units in the new trigger are the correct ones? There is little I can do when two codes are exactly equal and one of them works ... my belief is that you are missing some variable or selecting some wrong unit.
08-17-2009, 04:28 PM#3
darkwulfv
Quote:
Originally Posted by Flame_Phoenix
If you are using GUI then you deserve to have this horrible bug xD
Protip: That's the attitude Dusk was talking about.

So is everything between the two triggers exactly the same except for the unit being spawned? Have you tried using different units? Maybe it's a bug (somehow) with the Dark Apostle unit itself...
08-17-2009, 04:34 PM#4
Flame_Phoenix
Quote:
Protip: That's the attitude Dusk was talking about.
Don't worry, this guy is my friend, I am just kidding with him. I know he can do a much better system .
08-17-2009, 04:48 PM#5
Cheezeman
Yes of course, all the variables exist. And as I said, replacing Holy Warrior with Dark Apostle works, so there's no bug with units etc. Maybe has something to do with circle 0002?
08-17-2009, 04:50 PM#6
Flame_Phoenix
mmmm probably ... if circle 002 is a copy of the first circle, you have no problem ... if not perhaps the collision size is an issue.
08-17-2009, 04:50 PM#7
Troll-Brain
Attach the map ?
08-17-2009, 04:52 PM#8
Flame_Phoenix
Quote:
Attach the map ?
Damn, why I didn't make this questions first !? xD
08-17-2009, 04:53 PM#9
Themerion
Are you using the same circle for both unit types?

Dark Apostle:
Unit - A unit comes within 80.00 of Circle of Power 0075 <gen>
Holy Warrior:
Unit - A unit comes within 80.00 of Circle of Power 0075 <gen>

------------------
I think you should consider cutting some redundant code (to avoid obscure bugs with picking hero X, etc.)

pick hero X:
chooseHeroX
Collapse Events
Unit - A unit comes within 80.00 of Circle of Power 0075 <gen>
Collapse Conditions
(Unit-type of (Triggering unit)) Equal to Hero Selector
Collapse Actions
Trigger - Turn on FallenOne <gen>
Set UnitType = Holy Warrior
Trigger- Run Init Hero <gen>

Init Hero:
Init Hero
Collapse Actions
Unit - Create 1 UnitType for (Owner of (Triggering unit)) at (Center of PlayerSpawnLocation[(Player number of (Owner of (Triggering unit)))]) facing 270.00 degrees
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
FLAG_RandomHero[(Player number of (Owner of (Triggering unit)))] Equal to True
Collapse Then - Actions
Hero - Create Potion of Healing and give it to (Last created unit)
Collapse Else - Actions
Do nothing
Set UNIT_Heroes[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
Special Effect - Create a special effect at (Position of UNIT_Heroes[(Player number of (Owner of (Triggering unit)))]) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
Camera - Pan camera for (Owner of (Triggering unit)) to (Center of PlayerSpawnLocation[(Player number of (Owner of (Triggering unit)))]) over 0.30 seconds
Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
Unit - Remove (Triggering unit) from the game

This will allow you to keep most settings in 1 place, instead of in every pick-hero trigger.
08-17-2009, 05:08 PM#10
Cheezeman
Quote:
Originally Posted by Troll-Brain
Attach the map ?
I did before the first post
Quote:
Originally Posted by Themerion
Are you using the same circle for both unit types?
Ouch, sorry.
No, I'm not (I've remade that trigger countless times now andI forgot to change it the last time I did)

I was actually thinking about making such a system like you, but my mind has been blocked by this obscure bug.

<Read the edit after this comment>
OH GOD I HATE MY LIFE
Guess what?
I restart WE, and now it works.
FFS I had the computer turned off the whole night after I got the problem and nothing solved it, and now that I close and re-open WE like normally, it works.
GOD >:( Why always me? Why must I embarrass myself like this... I've made 2 threads on it and now it works, just by restarting WE (which I've already tried like 5 times with a 12h pause)

I'm gonna put a bullet through my head soon...

-------- Edit --------
Actually, now that this works another inittrig isn't run.
Anyone have an idea on what's going on? Cause, they're very related
08-18-2009, 08:54 AM#11
Flame_Phoenix
Quote:
FFS I had the computer turned off the whole night after I got the problem and nothing solved it, and now that I close and re-open WE like normally, it works.
I am also experiencing this bug with patch 1.24, don't know why...
08-18-2009, 09:00 AM#12
Anachron
This triggers are the worst I have ever seen, they scream out leakage, unuseability and horrible GUI coding, aswell as missing multifunctionality.
08-18-2009, 01:22 PM#13
Cheezeman
Quote:
Originally Posted by Anachron
This triggers are the worst I have ever seen, they scream out leakage, unuseability and horrible GUI coding, aswell as missing multifunctionality.
Wtf they arn't mine.
I'd gladly make them into efficient Jass machines but I can't make more triggers; they simply arn't ran in the InitCustomTriggers(), though they are called.
08-19-2009, 03:37 AM#14
Bobo_The_Kodo
Quote:
I'd gladly make them into efficient Jass machines but I can't make more triggers; they simply arn't ran in the InitCustomTriggers(), though they are called.
?
You must be doing it wrong
08-19-2009, 06:07 AM#15
Kwah
Mostly pointless, and un-related but don't use Do Nothings. Also oppurtunity to QFT Bobo.

Quote:
You must be doing it wrong