• 🏆 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!

[Trigger] A very basic spawn units spell not working

Status
Not open for further replies.
Level 2
Joined
Oct 11, 2009
Messages
5
The spell is this: I've given a building a spell that I built from the "Reveal" spell, you can target it anywhere on the map, it gives a shiny animation and it's supposed to spawn 5 units of my choice to that target point.

The spell naturally doesn't do anything other than give the animation I've chosen to the target location, the units are spawned by a trigger, and this is my trigger:
  • Events
    • Unit - A unit Finishes casting an ability
  • Conditions
    • (Ability being cast) Equal to Blablabla
  • Actions
    • Unit - Create 5 Blablabla for (Owner of (Triggering unit)) at (Target point of ability being cast) facing 270.00 degrees
Should be stupid simple...

Anyway the problem is clearly that the trigger doesn't realize where to target the spawning point for those 5 units, because no matter where the spell is targeted, the units always spawn at the center of the map. How to fix this?
 
Level 6
Joined
Mar 22, 2009
Messages
276
where did you base that ability?
does it have target??
create a variable for point.
like tmp_point
then set it
  • set tmp_point = Targetpoint of ability being cast
then after using it in your action
use
  • Custom script: call RemoveLocation (udg_tmp_point)
 
Level 2
Joined
Oct 11, 2009
Messages
5
Thank you both for the replies and your advice. I'll try these the next time I get back to my map.

Swipe5weep, I actually mentioned this in my original post, not sure if it was there very clearly. So the spell is built on "Reveal". I assumed it would be closest to the spell I'm making, as I wanted a spell that is first of all targettable, has spell animations that are easily changed, and you can change the spell data so that the spell doesn't do anything you don't want it to do - in my eyes "Reveal" offered all of these.

Yeah I don't know if reveal has some special targeting mechanics or something, I'll see first see though if your suggestions help me through this. Thanks.
 
Status
Not open for further replies.
Top