• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Got a problem with a Trigger-Code

Status
Not open for further replies.
Level 1
Joined
Jul 10, 2014
Messages
2
Hello guys,

I'm new to this and I wanted to create some spells with the Trigger-Editor. I guess I finished the Triggering but the spell doesn't work.

The skill:

The skill should create "Level of the Spell" + "Level of another Spells" Dummies. Each Dummy should spawn on a random point all over the playable maparea. Then the Dummies should attack the target of ability being cast with a spell.

The Trigger:

Start:
Unit - A unit starts an ability
Need:
(Ability being cast ) = Arkanpfeile
Action:
Set Counter_Arkanpfeil[(Player number of (Owner of (Triggering unit)))] = "Level of Arkanpfeile" for Triggering unit + "Level of Aiming" for Triggering unit
Wait 0.35 seconds
For each (integer A) from 1 to Counter_Arkanpfeil[(Player number of (Owner of (Triggering unit)))] do (Actions)
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Random point
in (Playable Map Area))
Unit - Add a 3 second Standard expiration timer to (last created unit)
Unit - Add Arkanpfeile (Dummy) to (Last created unit)
Unit - Set level of Arkanpfeile (Dummy) for (last created unit) to (Level
of Arkanpfeile for (Triggering unit))
Unit - Order (Last created unit) to Human-Mountainkind - Stormbolt
(Target unit of ability being cast)

The Problem:

The skill creates always just 1 Dummy who casts a spell. The number doesn't increase with the level of the ability.

The Dummy-Spell got max range, no mana costs and no cds. It can target all the units.


So I hope you could tell me how I can fix the problem with the skill. I'm sorry as I didn't know how to import triggers. That's why I had to write them down.


Thank you very much for your help

Greetings
 
http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/


First off, you don't need an array for that variable (not even a variable).

  • For each (Integer A) from 1 to (((Level of Arkanpfeile for (Triggering unit)) + (Level of Aiming for (Triggering unit))), do (Actions)
    • Loop - Actions
      • Set Point1 = (Random point in (Playable map area))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point1, facing 270.0 degrees
      • Custom script: call RemoveLocation (udg_Point1)
Are you sure that the Unit creation is nested within the loop?
 
Status
Not open for further replies.
Top