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

[JASS] Local variables?

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2008
Messages
502
HI.

Take a look at this trigger...

  • Untitled Trigger 015
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Far Sight
    • Actions
      • Custom script: local location inferno_target
      • Set inferno_target = (Target point of ability being cast)
      • Special Effect - Create a special effect at inferno_target using Units\Demon\Infernal\InfernalBirth.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Cause (Triggering unit) to damage circular area after 1.00 seconds of radius 350.00 at inferno_target, dealing 500.00 damage of attack type Chaos and damage type Universal
      • Wait 1.00 seconds
      • Environment - Create a 3.10 second Normal ripple deformation at inferno_target with starting radius 0.00, ending radius 1000.00, and depth 300.00, using 1.00 second ripples spaced 100.00 apart
      • Environment - Create a 0.50 second Permanent crater deformation at inferno_target with radius 150.00 and depth 100.00
      • Custom script: call RemoveLocation(udg_inferno_target)
      • Custom script: set inferno_target = null
I'm trying to create terrain effect when infernal hits the ground but I can't seem to make it MUI so if many inferal hit at once they all effect. I'm not great with JASS and I heard it is the way to do it.

Is it with local variables?
 
Level 12
Joined
Feb 13, 2009
Messages
386
Well, you can make it player-specific if you make inferno_target into inferno_target[# of player(owner of triggering unit)] array, also if you have multiple heroes you can make a variable "heronumber" and each time a hero enters the map you assign him a custom value of "heronumber" and make "heronumber=heronumber+1", I did it in my map and all "group" spells are based on that "heronumber" (so in your case you use inferno_target[heronumber]).
I'm just a week in wc3editor so I can't help you with JASS yet, sorry.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Well, you did one thing wrong:
You wanted to localize a global variable right?
Well, you forgot the 'udg_' prefix when declaring the local ;)
If you set that it should be MUI
  • Custom script: local location udg_inferno_target
this is how it should be ;)
 
Status
Not open for further replies.
Top