HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

need help with my spell

06-22-2009, 03:11 PM#1
Moh
Hi, i'm making a campaign (early chapters almost finnished) and i was trying to make a spell today but something doesn't work. I'm new to triggering and i don't use jass.

Spell: Vortex of Chaos
I based it of Tornado abillity with a custom model.
Tornado has Immolation like abillity.
5 lvl spell. Couse it's chaos based, i'd like it to have a random chance to spawn varius demons. Spell is named v.2 couse i tryed with bladestorm before.

Hidden information:
Trigger:
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Vortex of Chaos v.2
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Collapse Then - Actions
Wait 0.50 seconds
Collapse Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to Chaos Vortex 1 (Dummy unit))) and do (Actions)
Collapse Loop - Actions
Set VoCVortex = Chaos Vortex 1 (Dummy unit) 0449 <gen>
Set Random = (Random integer number between 1 and 1)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 1
Collapse Then - Actions
Set Random = (Random integer number between 1 and 4)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 1
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaosling for Neutral Hostile at (Position of VoCVortex) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 2
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaos Dragon for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 3
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaotic Voidwalker for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 4
Collapse Then - Actions
Unit - Create 1 Spawn of Chaos for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Quest - Display to (All players) the Hint message: MOH PWNS YOUR ASS b...
Collapse Else - Actions
Wait 2.00 seconds
Set Random = (Random integer number between 1 and 4)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 1
Collapse Then - Actions
Set Random = (Random integer number between 1 and 4)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 1
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaosling for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 2
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaos Dragon for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 3
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaotic Voidwalker for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 4
Collapse Then - Actions
Unit - Create 1 Spawn of Chaos for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Quest - Display to (All players) the Hint message: MOH PWNS YOUR ASS b...
Collapse Else - Actions
Wait 2.00 seconds
Set Random = (Random integer number between 1 and 4)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 1
Collapse Then - Actions
Set Random = (Random integer number between 1 and 4)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 1
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaosling for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 2
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaos Dragon for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 3
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaotic Voidwalker for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 4
Collapse Then - Actions
Unit - Create 1 Spawn of Chaos for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Quest - Display to (All players) the Hint message: MOH PWNS YOUR ASS b...
Collapse Else - Actions
Wait 2.00 seconds
Set Random = (Random integer number between 1 and 4)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 1
Collapse Then - Actions
Set Random = (Random integer number between 1 and 4)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 1
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaosling for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 2
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaos Dragon for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 3
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaotic Voidwalker for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 4
Collapse Then - Actions
Unit - Create 1 Spawn of Chaos for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Quest - Display to (All players) the Hint message: MOH PWNS YOUR ASS b...
Collapse Else - Actions
Wait 2.00 seconds
Set Random = (Random integer number between 1 and (Random integer number between 3 and 4))
Set Random = (Random integer number between 1 and 4)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 1
Collapse Then - Actions
Set Random = (Random integer number between 1 and 4)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 1
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaosling for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 2
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaos Dragon for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 3
Collapse Then - Actions
Unit - Create (Random integer number between (Random integer number between 1 and 3) and (Random integer number between 1 and 5)) Chaotic Voidwalker for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Random Equal to 4
Collapse Then - Actions
Unit - Create 1 Spawn of Chaos for Neutral Hostile at ((Position of VoCVortex) offset by ((Random real number between 1.00 and 100.00), (Random real number between 1.00 and 100.00))) facing (Random angle) degrees
Collapse Else - Actions
Quest - Display to (All players) the Hint message: MOH PWNS YOUR ASS b...
Else - Actions
Else - Actions


I'll rly appriciate if some1 takes a look of this trigger and help me to make it work.

ty in advance
06-22-2009, 08:45 PM#2
Zyrixion
EDIT: Disregard my previous statement, I did not scroll down enough in your code lol. What's wrong with your trigger is the 'Set VoCVortex = Chaos Vortex 1 (Dummy Unit) 0449 <gen> because you're pointing to a unit pre-placed on the map, and not what you just spawned. At least that's the only obviously off thing. try setting it to 'picked unit' and switching your event to 'A Unit Enters Region' with 'playable map area' as the region, and then catch your spawned unit that way.
06-23-2009, 05:39 AM#3
Moh
that's what i did in the original code. i tested the unit summoning by taking position of a specific unit and nothing happened. I forgot to return location to picked unit before i posted. sry.

about the other event i'll try it ty.


EDIT: i tried it as u said, i used event Unit enters region, set conditions to Entering unit = Tornado and it works. It needs some balancing and i'll do that now.

EDIT 2: It works now, ty for help.