Newbwc3's Help Thread

Status
Not open for further replies.

PurgeandFire

zxcvmkgdfg
Reaction score
508
I think you can calculate the time using "Distance/Speed." Then you can attach the special effect to the target unit. I think that is how you figure it out, sorry if I'm wrong..

btw: The "Distance" and "Speed" are variables. (Integer I think or maybe Real)

___________________________

HEAD BANGER!!! :banghead: :banghead:
 

Newbwc3

Sephiroth_VII
Reaction score
157
Code:
Gernade explosion graphic
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Gernade 
    Actions
        Set Timetaken = ((Current acquisition range of (Casting unit)) / 200.00)  <<< 200 is the missle speed
        Wait Timetaken seconds
        Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl

With this code the explosion grapic only works sometimes.How to fix so U see the the explosion graphic when the missle art impacts the target?

(O and the target type is not one single unit it is a small area that U select.)
SOLVED
 
D

dariidar

Guest
the ChaosSpaceOrcs projectile art for his attack is part of his model file.Like Attack-2 or somthin. So I cannot simply change the ChaosSpaceOrcs model file to Shredder. I wish Someone could give me a projectile art "flamethrower" that would be real cool.

Even if I did have the right Projectile art I wouldnt be able to get the shredder to do a ranged attack and a melee attack...help.
Give the guy 2 attacks. First is melee, second is ranged.
Then you set:
Attacks Enabled- Both
in the unit editor.
First attack:
Targets allowed- ground
Range: 100 (melee)

Second attack:
Targets allowed- ground, air
Range: X (more than 100)
If you set the attack art to the Dragon's flames, then I think you get the sound file for it too.

As for the flamethrower, I don't know if you can do that, but I do know that the dragon flames or frost wyrm attacks look similar. Change the attack animation to that instead.
 

Tom Jones

N/A
Reaction score
437
Why are you using acquisition range?
Let's try something else. I presume that your ability is using a missile, so go to the object editor and find the field called Art - Missile Speed. Remember this value. Now go to the trigger editor. We need to know the excact time the missile will travel before hitting the target. This is actually really simple, all you gotta do is this:
Code:
If your ability is a unit target ability use this:
Wait ((Distance between (Position of (Triggering unit)) and (Position of (Target unit of ability being cast))) / *Missile Speed*) seconds

If your ability is a point target ability use this:
Wait ((Distance between (Position of (Triggering unit)) and (Target point of ability being cast)) / *Missile Speed*) seconds
And then create the special effect after the wait.
 

Newbwc3

Sephiroth_VII
Reaction score
157
Still doesnt work. The timing of the effect gets better the closer the target point is.
Code:
Gernade explosion graphic
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Gernade 
    Actions
        Wait ((Distance between (Position of (Casting unit)) and (Target point of ability being cast)) / 200.00) seconds
        Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl

This code looks like it should work perfectly to me.
SOLVED
 

Newbwc3

Sephiroth_VII
Reaction score
157
It works, Somewhat, but I think it leaks

Code:
Gernade explosion graphic
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Gernade 
    Actions
        Wait ((Distance between (Position of (Casting unit)) and (Target point of ability being cast)) / 200.00) seconds
        Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl

Or it could be because of the 0.35 arc on the missle?Or maybe because I'm using an ability mdl?:confused:
SOLVED
 

elmstfreddie

The Finglonger
Reaction score
203
Edit your first post with questions please! And if they are solved, edit out the question with -=Solved!=-

(I have no clue what you need to know!)
 

Duwenbasden

Ver 6 CREATE energy AS SELECT * FROM u.energy
Reaction score
165
Code:
Gernade explosion graphic
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Gernade 
    Actions
        Wait ((Distance between (**LEAK**Position of (Casting unit)) and (**LEAK**Target point of ability being cast)) / 200.00) seconds
        Special Effect - Create a special effect at (**LEAK**Target point of ability being cast) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl

You asked for leaks... you get leaks. Put all the location things in variables and destroy them after.
 

Newbwc3

Sephiroth_VII
Reaction score
157
Ok Ill try and elaborate a bit. Im trying to make a graphic effect happen at the target of the ability when the missile art impacts. The following code is what i got so far:

Code:
Gernade explosion graphic
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Gernade 
    Actions
        Wait ((Distance between (Position of (Casting unit)) and (Target point of ability being cast)) / 200.00) seconds
        Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl

When testing out this ability in my map the graphic effect doesnt always happen at the right time and sometimes doesnt even happen at all!

Best way to show U this is to Show U the map

Just look on my map project post
SOLVED
 

Newbwc3

Sephiroth_VII
Reaction score
157
Code:
Gernade explosion graphic
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Gernade 
    Actions
        Set point = (Position of (Casting unit))
        Set point = (Target point of ability being cast)
        Wait ((Distance between (Position of (Casting unit)) and (Target point of ability being cast)) / 200.00) seconds
        Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl

I see no "destroy variable" action:confused:
SOLVED
 

Duwenbasden

Ver 6 CREATE energy AS SELECT * FROM u.energy
Reaction score
165
Create variable for each location! 1 for 1, 2 for 2, 3 for 3!
====================
you need a custom script:

Code:
call RemoveLocation (LOCATION_VARIABLE_YOU_WANT_REMOVED)
 

Newbwc3

Sephiroth_VII
Reaction score
157
Code:
Gernade explosion graphic
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Gernade 
    Actions
        Set pointone = (Position of (Casting unit))
        Set pointtwo = (Target point of ability being cast)
        Set pointthree = (Target point of ability being cast)
        Wait ((Distance between pointone and pointtwo) / 200.00) seconds
        Special Effect - Create a special effect at pointthree using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
        Custom script:   call RemoveLocation (udg_pointone)
        Custom script:   call RemoveLocation (udg_pointtwo)
        Custom script:   call RemoveLocation (udg_pointthree)
Heres what I did is this correct? When I try out the ability it takes like 3 seconds after impact to show the graphic. I WANT it to show the graphic right when the art missle impacts.

Duwenbasden: You forgot to tell me to put udg_ in front of the varible name. What does udg mean anyway?
SOLVED
 
Z

Zell

Guest
"udg_" refers to "user defined global". All variables created in the variable editor are global. There are no GUI locals. A global, as the name implies, is used across all triggers. A local is specifically used by one instance of a trigger, and therefore makes JASS MUI automatically since each time the trigger fires, a new instance with unique locals is que'd (?).
 

Newbwc3

Sephiroth_VII
Reaction score
157
Ok now how do I reduce the time it takes to show the graphic so U'll see the explosion effect right when the missile art impacts.
SOLVED
 

Newbwc3

Sephiroth_VII
Reaction score
157
(I solved the last one on my own)

NEW QUESTION:
When ever you use event-locations in triggers is it always necissary to put them in varibles and then call-remove location afterwards?
----------------------------------------EXAMPLE--------------------------------------
This code:
Code:
[B]Events-[/B] unit uses ability
[B]conditions-[/B]ability equal to firebolt
[B]actions-[/B] Wait distance between (position of triggering unit)and (position of point being targeted)
changed to this:
Code:
[B]Events- [/B]unit uses ability
[B]conditions-[/B] ability equal to firebolt
[B]actions-[/B] Set Varible "point1"=(position of triggering unit)
Set Varible "point2"= (position of point being targeted)
Wait distance between (point1) and (point2)
call RemoveLocation (udg_point1)
call RemoveLocation (udg_point2)
SOLVED
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
Technically, you do not HAVE to remove the locations, but doing so reduces lag in the map and is a VERY VERY VERY good idea, so i suggest you always remove them.
 

Newbwc3

Sephiroth_VII
Reaction score
157
Ok are there any other methods of making a map "not lag" and enhancing triggers that I am not aware of? (this is the only method i know)
SOLVED
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top