A problem with my spell

werasd

New Member
Reaction score
14
Well, i'm trying to make spell which bashes a unit and move it toward. The percentage of it happens is 25%. Just seeing you'll have more details.

I won't post the triggers here cause they aren't just one! I attached the map.

Please see it and tell me what is not correct!
 

Attachments

  • Carefree Soldier.w3x
    21.6 KB · Views: 85

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
I won't post the triggers here cause they aren't just one! I attached the map.
Some of us do not have Warcraft installed on the computers we are on. It would be better for you to post what your problem is and the relevant triggers; there's nothing wrong with posting more than one trigger.
 

werasd

New Member
Reaction score
14
The triggers

Variables:
Code:
AgonizeCaster - Unit
AgonizeLearn - Boolean
AgonizeRandom - Real
AgonizeTarget - Unit

Code:
Agonize Random
    Events
        Unit - A unit Is attacked
    Conditions
        AgonizeLearn Equal to True
    Actions
        Set AgonizeRandom = (Random real number between 0.00 and 100.00)
        Set AgonizeTarget = (Attacked unit)
        Set AgonizeCaster = (Attacking unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Agonize  for AgonizeCaster) Equal to 1
                AgonizeRandom Less than or equal to 25.00
            Then - Actions
                Trigger - Turn on Agonize Action <gen>
            Else - Actions
                Skip remaining actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Agonize  for AgonizeCaster) Equal to 2
                        AgonizeRandom Less than or equal to 25.00
                    Then - Actions
                        Trigger - Turn on Agonize Action Copy <gen>
                    Else - Actions
                        Skip remaining actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Agonize  for AgonizeCaster) Equal to 3
                                AgonizeRandom Less than or equal to 25.00
                            Then - Actions
                                Trigger - Turn on Agonize Action Copy 2 <gen>
                            Else - Actions
                                Skip remaining actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Level of Agonize  for AgonizeCaster) Equal to 4
                                        AgonizeRandom Less than or equal to 25.00
                                    Then - Actions
                                        Trigger - Turn on Agonize Action Copy 3 <gen>
                                    Else - Actions
                                        Skip remaining actions

Code:
Agonize Learn
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Agonize 
    Actions
        Set AgonizeLearn = True

Code:
Agonize Action
    Events
    Conditions
    Actions
        Unit Group - Pick every unit in (Units within ((Facing of AgonizeCaster) + 3.00) of (Position of AgonizeCaster)) and do (Actions)
            Loop - Actions
                Unit - Add Crow Form to AgonizeTarget
                Wait 0.00 seconds
                Unit - Move AgonizeTarget instantly to ((Position of AgonizeCaster) offset by 9.00 towards (Facing of AgonizeCaster) degrees)
                Unit - Pause AgonizeTarget
                Wait 2.00 seconds
                Unit - Unpause AgonizeTarget
                Trigger - Turn off (This trigger)

Code:
Agonize Action Copy
    Events
    Conditions
    Actions
        Unit Group - Pick every unit in (Units within ((Facing of AgonizeCaster) + 3.00) of (Position of AgonizeCaster)) and do (Actions)
            Loop - Actions
                Unit - Add Crow Form to AgonizeTarget
                Wait 0.00 seconds
                Unit - Move AgonizeTarget instantly to ((Position of AgonizeCaster) offset by 9.00 towards (Facing of AgonizeCaster) degrees)
                Unit - Pause AgonizeTarget
                Wait 2.75 seconds
                Unit - Unpause AgonizeTarget
                Trigger - Turn off (This trigger)
 

werasd

New Member
Reaction score
14
Code:
Agonize Action Copy 2
    Events
    Conditions
    Actions
        Unit Group - Pick every unit in (Units within ((Facing of AgonizeCaster) + 3.00) of (Position of AgonizeCaster)) and do (Actions)
            Loop - Actions
                Unit - Add Crow Form to AgonizeTarget
                Wait 0.00 seconds
                Unit - Move AgonizeTarget instantly to ((Position of AgonizeCaster) offset by 9.00 towards (Facing of AgonizeCaster) degrees)
                Unit - Pause AgonizeTarget
                Wait 2.00 seconds
                Unit - Unpause AgonizeTarget
                Trigger - Turn off (This trigger)

Code:
Agonize Action Copy 3
    Events
    Conditions
    Actions
        Unit Group - Pick every unit in (Units within ((Facing of AgonizeCaster) + 3.00) of (Position of AgonizeCaster)) and do (Actions)
            Loop - Actions
                Unit - Add Crow Form to AgonizeTarget
                Wait 0.00 seconds
                Unit - Move AgonizeTarget instantly to ((Position of AgonizeCaster) offset by 9.00 towards (Facing of AgonizeCaster) degrees)
                Unit - Pause AgonizeTarget
                Wait 3.50 seconds
                Unit - Unpause AgonizeTarget
                Trigger - Turn off (This trigger)


Those are the triggers. The last five one are initially off.
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
What is not working? What does work? What have you tried to fix it? What parts have you tried debugging?
 

werasd

New Member
Reaction score
14
The Fucking Problem Is Because The Spell Won't Work!!!!!!!!!! It's Not Working Anyway! My God
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
well we can't help u like this tell us what u want it to do and what happens or this thread is useless cause we can't read ur mind.....
 

werasd

New Member
Reaction score
14
Ok, now i am calm, the problem is that the spell doesn't do nothing.
I atack many times and nothing happens. Like the spell doesn't even exist. Understand now?
 

Slapshot136

Divide et impera
Reaction score
471
for agonize learn equal to true, you can just do an intiger comparison and see if the level of agonize is greater then 0

at the first trigger under the first else you have a skip remaining actions, y have any actions there at all if they will be skipped anyways?

your unitgroup - pick everyone within 3 + faceing of caster wont work. that makes it's range be determined by the faceing of the unit, so faceing up it's 270, and faceing down it's 90. the +3 is negligeable.

you dont need to add storm crow form as your not making the unit fly via set fly height, you dont even remove it
now for debugging it try adding a text at the start of each trigger saying "trigger blah has been run" and seeing if that text is displayed
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Here is the map, and the spell works..."works", it got leaks that you need to fix.. etc.. What was wrong? Well, you just "turn trigger on"... And those trigger you turned on had zero events which mean they would NEVER EVER run...You need to "Trigger - Run trigger checking/ignoring conditions". And secondly you "picked every unit within".....Why did you do that? When you alread have the target that is being attacked by the "knight" in a Variable "agonizeTarget"?...So....Ye...Look here...
BTW; I only fixed level 1, hope you can copy paste the level 1 trigger :p lol
HF=)

Edit; i forgot to tell you...Your random number does not work..why? Well, you need to "Enable" random sort of.. HOW? HERE: Top menu bar, FILE > Preferences > TEST MAP > CHECK FOR RANOM NUMBEr Seed..
 

Attachments

  • Carefree Soldier.w3x
    20.8 KB · Views: 92
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top