How do you make special effects?

H

Hohan

Guest
I presume the circle spell animation for teleport is a special effect. If so, I would like to know how to use it.

Thanks.

Hohan
 
Dawww Iono... What you can do is go to the ability and get the art model files, apply to a unit you arent using and put him on the map. See what the model looks like untill you find the right one, also check buff/effect models. When you find it copy the path and reset the unit. Tadaaaa
 
Add this to your map:

Code:
Special Effect Destruction
    Events
    Conditions
    Actions
        Custom script:   local effect tempEffect
        Custom script:   set tempEffect = udg_SpecialFX
        Wait 7.00 game-time seconds
        Custom script:   set udg_SpecialFX = tempEffect
        Special Effect - Destroy SpecialFX

Then you can just add this to your triggers:

Code:
Special Effect - Create a special effect at <point> using <SFX>
Trigger - Run Special Effect Destruction <gen> (ignoring conditions)
 
hmm....... like when you use a scroll of town portal or that tele to structure item. Thanks for the idea.
 
wow you posted while i was typing kershbob. That would be my first specific custom trigger from another person :D . i'll try it.
 
That's the one blizzard uses for cleaning up SFX. Other people use other ones though but the idea is the same.
 
what would it be corrected then, i would like to know....
 
Special Effect - Create a special effect at <point> using <SFX>
Set SpecialFX = (Last created special effect)
Trigger - Run Special Effect Destruction <gen> (ignoring conditions)

or

Custom script: local effect tempEffect = (Last created special effect) (*)
Wait 7.00 game-time seconds
Custom script: set udg_SpecialFX = tempEffect
Special Effect - Destroy SpecialFX



(*) sorry, I never remember those GetLastSomething() in JASS :)
 
so your destrcution trigger would only need like


Code:
Wait 7.00 game-time seconds
Special Effect - Destroy SpecialFX
set SpecialFX = null


?
 
emjlr3 said:
so your destrcution trigger would only need like
Code:
Wait 7.00 game-time seconds
Special Effect - Destroy SpecialFX
set SpecialFX = null
?
Nop, you still need the entire code.
As SpecialFX is a global, its value may change during the 7.00 seconds of duration.
So storing it in a local variable and then removing is your best bet.

BTW, with GUI created Special Effects I suggest you to use AceHart's way.
Code:
[b]Special Effect Destruction[/b]
Actions
    Custom script: local effect tempEffect = [u]GetLastCreatedEffectBJ( )[/u]
    Wait 7.00 game-time seconds
    Custom script:   set udg_SpecialFX = tempEffect
    Custom script:   [i]set tempEffect = null[/i]
    Special Effect - Destroy SpecialFX
Underlined is what AceHart can't remember. You can also use bj_lastCreatedEffect
Also always remember to nullify your locals if they point to any handle (Added in italics)

BTW, a good improvement can be to be able to modify the time the special effect remains alive.
Code:
[b]Special Effect Destruction[/b]
Events
Conditions
Actions
    Custom script: local effect ef = bj_lastCreatedEffect
    Custom script: local real lifetime = udg_SFX_LifeTime
    Set SFX_LifeTime = SFX_LifeTime_Default
    Custom script: call TriggerSleepAction( lifetime )
    Custom script: call DestroyEffect( ef )
    Custom script: set ef = null

[b]Map Initialization[/b]
Events
    Map Initialization
Actions
    ...
    Set SFX_LifeTime_Default = 7.00
    Set SFX_LifeTime = SFX_LifeTime_Default
So in your code you can do something like
Code:
...
Create a special effect at (point) using (SFX)
Run Special Effect Destruction

Create a special effect at (point) using (SFX2)
Set SFX_LifeTime = 15.00
Run Special Effect Destruction

Create a special effect at (point) using (SFX3)
Run Special Effect Destruction
The first special effect remains alive 7 seconds (the default behaviour that can be changed at map initialization)
The second one remains in screen 15 seconds
Third also dies after 7 seconds because the trigger restores lifetime value to default.

I hope this clarifies (maybe not) and helps a bit.
 
Actually, this is the one of the few times i actually seen any custom scripts :confused: . Anyways I got this:

Code:
function Trig_Foot_Switch_to_Teleport_Actions takes nothing returns nothing
    call ForGroupBJ( GetUnitsInRectAll(gg_rct_Region_006), function Trig_Foot_Switch_to_Teleport_Func005002 )
    [B]local effect tempEffect = GetLastCreatedEffectBJ( )[/B]
    call PolledWait( 7.00 )
    [B]set udg_SpecialFX = tempEffect[/B]
    [B]set tempEffect = null[/B]
    [B]Destroy SpecialFX
[/B]

The lines that are in bold have some kind of error or something. Sorry about all this trouble I'm causing :banghead: .
 
by the way, this is what i got so far....... im sooo lost :( im such a newbie.

Code:
Events:
Unit - A unit enters Region 010 <gen>
Unit - A unit enters Region 009 <gen>

Conditions:
((Owner of (Triggering unit)) controller) Equal to (Player 1 (Red) controller)
((Foot Switch 0068 <gen> is dead) Equal to True) and ((Foot Switch 0069 <gen> is dead) Equal to True)

Actions
Unit Group - Pick every unit in (Units in Region 006 <gen>) and do (Unit - Move (Picked unit) instantly to (Center of Region 008 <gen>))
Custom script:   local effect tempEffect = GetLastCreatedEffectBJ( )
Wait 7.00 game-time seconds
Custom script:   set udg_SpecialFX = tempEffect
Custom script:   set tempEffect = null
Custom script:   Destroy SpecialFX

Tell me if ive done anything wrong. :confused:
 
> ((Owner of (Triggering unit)) controller) Equal to (Player 1 (Red) controller)

Replace this with a "player" comparison, not "player controller".

And, that trigger doesn't create any special effects.
Remove all that effect handling...
 
Your last trigger posted here has a couple "custom script" lines dealing with Special Effects.
Your trigger, however, doesn't create any.
So, why do you have those lines?
 
I hope this simple example map clarifies some things...
 

Attachments

  • special effect.w3x
    16 KB · Views: 162
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top