• 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.

[Spell] Laser Spell

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Hi all.

I want to make a laser spell. But I have no idea how to start. I know its channeled spell but I have never created lightning effects from unit to point so idk how its done.

Also most laser spells I found seem to be in vJass. SO I can't learn from that.

I want to learn to make my own, not just copy paste one.
 

sentrywiz

S

sentrywiz

An example would be good. A GUI example to be exact.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
Since you wish to learn, I wont send exact triggers.

basically something like this.

1. you cast the spell
2. the trigger detects the spell is cast
3. pick every unit within X range
4. check if the angle between the caster and the picked unit is equal to the angle between the caster and the targeted location point.
5. if it matches, deal damage

If you don't want it to be an instant cast spell that only deal damage instantly, you just repeat the processes in a loop. Head over to the tutorial section if you want more info on how to do that.
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
He means the phoenix spell of laser in DotA.

That's actually not that hard. You just have to collect some information before starting :
1- Channeling spell, so it means we use either (Unit - A Unit starts the effect of an abilty) or (Unit - A Unit starts channeling a spell)
2- It's damaging every unit every 1 seconds, it means there is a periodic trigger to damage units within its laser.
3- Once the caster turns for example 45, the laser will automatically turn with it 45 °, which means there is an updating trigger that changes the laser position and angle everytime.
4- It uses a linear laser == it means it uses lightning Effect.
5- When the phoenix stops channeling , maybe it's auto-timed spell , for example it's set to end after 5 seconds. Here we need timers.

Long story short, you need up to 4 triggers.

If you want me to create the spell no problem but first try it yourself :D
 

sentrywiz

S

sentrywiz

Since you wish to learn, I wont send exact triggers.

basically something like this.

1. you cast the spell
2. the trigger detects the spell is cast
3. pick every unit within X range
4. check if the angle between the caster and the picked unit is equal to the angle between the caster and the targeted location point.
5. if it matches, deal damage

If you don't want it to be an instant cast spell that only deal damage instantly, you just repeat the processes in a loop. Head over to the tutorial section if you want more info on how to do that.

The 4. point is where I don't understand. What is the angle thing you're talking about?

He means the phoenix spell of laser in DotA.

That's actually not that hard. You just have to collect some information before starting :
1- Channeling spell, so it means we use either (Unit - A Unit starts the effect of an abilty) or (Unit - A Unit starts channeling a spell)
2- It's damaging every unit every 1 seconds, it means there is a periodic trigger to damage units within its laser.
3- Once the caster turns for example 45, the laser will automatically turn with it 45 °, which means there is an updating trigger that changes the laser position and angle everytime.
4- It uses a linear laser == it means it uses lightning Effect.
5- When the phoenix stops channeling , maybe it's auto-timed spell , for example it's set to end after 5 seconds. Here we need timers.

Long story short, you need up to 4 triggers.

If you want me to create the spell no problem but first try it yourself :D

Oh no no no... i want a simple laser spell. it doesn't move. you cast it once and it shoots there until you stop or until it finishes.

I just don't know these points:

1. I found a fire laser on the hive that I want to use as the 'laser'
2. I can import it, but how do I use it? Do I make a dummy unit, put the fire laser as it and then create the dummy unit from point A to point B when the spell is cast?

Since you wish to learn, I wont send exact triggers.

That's fine, but its better for me if you do. Because I already understand 80% of how to make the spell.
The only things I don't are the laser animation.

Basically I've made a channeling spell that damages all enemies in point A for X damage every Y seconds until laser finishes or its cancelled.
Now I just want to attach the cool fire laser model I found on hive so that it looks cooler.
That's basically it.
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
Oh it's simple bro... Since it doesn't move then it's very very simple.

You have to create a dummy for example named 'LaserDummy' , change its model to the one you imported.

In the triggers, create the dummy one after one, one after one until it creates a line. Otherwise use lightning effect.

Here is an example for how to create a one-by-one linear path of laser.

  • Set LaserStartReal = 100
  • For each Integer Variable LaserInteger from 1 to (Distance) and do :
    • Loop - Actions
      • Set DummySpawnPoint = ( (CasterPoint) offset by LaserStartReal towards (Facing of (Caster) Angle)
      • Unit - Create 1 LaserDummy in DummySpawn Point facing (Facing of Caster Angle)
      • Set LaserStartReal = (LaserStartReal) + 100 ( It may be 200 or 300 , depends again on your dummy's scaling value)
      • Custom script: call RemoveLocation(udg_DummySpawnPoint)
 

sentrywiz

S

sentrywiz

Oh it's simple bro... Since it doesn't move then it's very very simple.

You have to create a dummy for example named 'LaserDummy' , change its model to the one you imported.

In the triggers, create the dummy one after one, one after one until it creates a line. Otherwise use lightning effect.

Here is an example for how to create a one-by-one linear path of laser.

  • Set LaserStartReal = 100
  • For each Integer Variable LaserInteger from 1 to (Distance) and do :
    • Loop - Actions
      • Set DummySpawnPoint = ( (CasterPoint) offset by LaserStartReal towards (Facing of (Caster) Angle)
      • Unit - Create 1 LaserDummy in DummySpawn Point facing (Facing of Caster Angle)
      • Set LaserStartReal = (LaserStartReal) + 100 ( It may be 200 or 300 , depends again on your dummy's scaling value)
      • Custom script: call RemoveLocation(udg_DummySpawnPoint)

I see. Thanks. I was thinking of a lightning rather than make many dummies to form a laser.
 
Status
Not open for further replies.
Top