HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Fist of the Heavens Spell

06-24-2004, 02:58 AM#1
Neoreo
Hey...im trying to do a fist of heavens spell..and i have everything the way i want it except i cannot find a way to make the holybolts come out from the target in random directions and keep going, damaging anybody on the way. Is it possible to do this with regular triggers? or does it need JASS?

Heres a picture of what im going for..this is after the bolt comes down, which i have down good. Just need help with the holy bolts :D



thanks for any help ^_^
06-24-2004, 03:47 AM#2
Narwanza
Many people think that JASS gives a person more power over the editor, but in reality, that power we get from it is very limited. We gain some power over it by coding in JASS, but what we gain mostly is the ability to do things that are not impossible in the GUI, but rather so hard to do that they might as well be impossible. Anyway, your spell is quite easy to create in either. Create a unit with a lightning model (thrall's projectile) and give it phoenix fire as an ability. Reduce the burn time on the phoenix fire down to .01 and give it a range of 50 - 100 (depending on the size of the unit) and whatever projetile you want (you probably won't see the projectile) and whatever cooldown you want. Now after the unit is created in the object editor go to the trigger editor. After the lightning bolt comes down what you need to do is make the following actions.

Code:
for each integer a from 1 to (however many lightnings you want)
    Create 1 lightning unit for OwnerOfCastingUnit at position of CastingUnit
    Order LastCreatedUnit to Move to PositionOfCastinUnit offset by 100 towards RandomAngle
    (Now the next line is a custom script line that you need to copy and paste)
    call UnitAddAbilit(bj_lastCreatedUnit,'Aloc')

Now from here you need to decide how you want them to disappear. There are several ways you could do this, one is create a unit specific timer that will exipre and destroy the unit (very complicated in JASS) or you could add them all to a group and have the entire group die after x amount of seconds (I would recommend this one).
06-24-2004, 06:22 AM#3
Neoreo
Well it worked! Thanks alot for the help! I just started doing trigger enhanced spells and it would have taken me hours to find that out :D

My trigger ended up looking like this incase you were wondering:

Events:

Unit - A unit Starts the effect of an ability

Conditions:

(Ability being cast) Equal to Fist of the Heavens

Actions:

(Damage stuff)

For each (Interger A) from 1 to boltnum, do (Actions)
Unit - Create 1 Holy Bolt for (Triggering player) at (Target point of abiluty being cast) facing Default building degrees
Unit - Turn collision for (Last created unit) Off
Unit - Move (Last created unit) instantly to (Target point of ability being cast)
Unit - Add a 2.75 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Move To (Random point in (Playable map area)
Edit: One more question :o would it be easier to do a blessed hammer type spell (a hammer that rotates around you going further and further away from you with each rotation damaging everybody it hits if your not familiar with Diablo II) with JASS (as in look at other peoples examples such as vexorians EXTREMLY helpful example maps) or just regular triggers?
06-24-2004, 12:51 PM#4
AIAndy
You should rather use the event starts the effect instead of begins casting since the second fires at the beginning of the casting animation where the spell still can be cancelled.
06-24-2004, 03:21 PM#5
Neoreo
ohhh i didnt know that..thanks i changed it :D

This is what it looks like so far, i still havent changed the burn time on the pheonix fire. The damage trigger was taken out so I could see if anything went wrong more clearly. Im trying to find a way to send them all in random directions since they all seem to be going only up and down in groups this way.

06-24-2004, 04:37 PM#6
Narwanza
A few things that will help you out. For Integer A is a loop so it will do those things as many times as you tell it to. This brings up the integersing point here.

Code:
For each (Interger A) from 1 to boltnum, do (Actions)
    Unit - Create [color=red]boltnum[/color] Holy Bolt for (Triggering player) at (Target point of abiluty being cast) facing Default building degrees

This seems interesting because you will create bolnum units boltnum times. Say boltnum was set to 4, you would create 16 units because it would create 4 units 4 times. I would just create 1 each time. Another thing is that you don't add the 'Aloc' ability to them. This is important in spells like this because it makes them so you can't select them, see them on the minimap, or be targeted by any other person, but they can still attack. Um, the move them instantly line is kind of useless since you created them at the spot you are moving them to. Other than that it looks perfectly fine.
06-24-2004, 04:49 PM#7
Narwanza
This is in response to the random angles. You could generate random angles that are not completly random, like this. Create variables named OldAngle and NewAngle and read the following code.

Code:
for each integer A from 1 to boltnum
    (unit stuff)
    (all of the following should be added in custom script lines because it is jass)
    loop
        exitwhen udg_NewAngle > udg_OldAngle + 20 or udg_NewAngle < udg_OldAngle - 20
        set udg_NewAngle = GetRandomReal(0,360)
    endloop
    (end of the JASS code)
    set OldAngle = NewAngle
    Order LastCreatedUnit To Move To Position of casting unit offset by 10000 towards OldAngle degrees

This means that they will still move in fairly random directions, just two won't move within 20 degrees of each other.
06-24-2004, 05:24 PM#8
Neoreo
Thanks again..it looks like it all worked! I didnt add the aloc code thing before because it gave me an error when i copy and pasted it... but that was my fault since i didnt read over what i was copying and pasting (the y at the end of ability was missing.) Other than that..heres what the new trigger looks like and the spell! I have the move instantly because they used to be spawned around the units at the target point..but that was before i took off collision detection etc..and i havent had time to test it with out it on.





Thank you again for the help..i would of never goten this spell done without it
06-24-2004, 11:27 PM#9
Vexorian
Since it was solved in triggers I am going to move it to the trigger haven so people there can see this thread.
06-25-2004, 04:16 PM#10
LunaSeer
Umm I think the Holy Bolts in D2 moved towards all units within the area (enemy and ally 1 per unit) and not in random directions but I'm not sure.

I'm thinking of making one myself. A bit different of course.
06-26-2004, 03:35 AM#11
Neoreo
yea, i dont know either, i havent played it in a while, i need to get mine back from my friend to look at it again ^_^ .. if anybody is copying that spell, i think it might have part of vexorians caster system in it, the damage part is based off of exorsism. But then again i have very close to no idea what im doing so :D

If anybody seriously wants this really bad spell let me know and ill submit it to the spell downloads page thing
06-26-2004, 04:10 AM#12
Pheonix-IV
another way to do it would be to have a dummy unit with an edited shockwave spell spawn, on the target and then cast the shockwave in random directions.
06-26-2004, 04:26 AM#13
Neoreo
As in instead of the bolts?
06-26-2004, 04:29 AM#14
Pheonix-IV
as in instead of units as the bolts. Using shockwave would mean that units running away from the bolts wouldnt take more damage and units running towards them wouldnt take less damage.
06-26-2004, 04:37 AM#15
Neoreo
ohhhh good idea :D , ill try that soon and see what happens