wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Closed Thread
 
Thread Tools Search this Thread
Old 12-22-2005, 01:30 AM   #1
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Information [jass], [hiddenjass], [ljass] and [trigger] tags

Please use the [jass] and [trigger] tags

trigger tag

Trigger:
Spell Ability
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Spell
Collapse Actions
Set TargetUnit = (Target unit of ability being cast)
Set Caster = (Triggering unit)
Set UnitDamage = (# + (# x (Real((Intelligence of Caster (Include bonuses))))))
Unit - Cause Caster to damage TargetUnit, dealing UnitDamage damage of attack type Normal and damage type Universal
Floating Text - Create floating text that reads (String(UnitDamage)) at (Target point of ability being cast) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Wait 1.00 seconds
Floating Text - Destroy (Last created floating text)


Jass tag
Collapse JASS:

function DoSomething takes unit u returns location
    return GetUnitLoc(u) //this will leak if not cleaned
endfunction

function Na takes nothing returns nothing
 local effect fx=AddSpecialEffect("boo\\ba.mdl", DoSomething(GetTriggerUnit()))

   call DestroyEffect(fx)

 //fx is not set to null so it leaks anyways no matter it was destroyed
endfunction

JASS tag - Errors and highlight
The jass tag has 2 features to add more functionality, some times you want to point out an error or put more strength to some text, you can place errors between # # and things to highlight between @ @

Collapse JASS:
call SetUnitPositionLoc(u, GetUnitLoc(ou) )


call SetUnitPosition(u, GetUnitX(ou), GetUnitY(ou) )


The code that generated the above code block is:


[jass]
call SetUnitPositionLoc(u, #GetUnitLoc(ou)# )


call SetUnitPosition(u, @GetUnitX(ou), GetUnitY(ou)@ )

[/jass]


JASS tag - JASS extensions
As a way to officiallize a preprocessor syntax that was the result of some kind of agreement, //! is considered preprocessor directive by the JASS tag.

Collapse JASS:
//! include something.j
function blah takes nothing returns nothing //...


The keywords static, struct and endstruct are also highlighted

Inline JASS tag [ljass]
Sometimes you only need highlight for a single line and a whole block is too much, for example: call DoNothing()
Initially collapsed JASS tag
You may want to make your script begin collapsed, then use the hiddenjass instead of the jasstag

[hiddenjass=My Function]function myfunction takes nothing returns real
return 56.3
endfunction
[/hiddenjass]

Expand My Function:
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline  
Sponsored Links - Login to hide this ad!
Old 10-03-2006, 05:25 AM   #2
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

there are updates...
Vexorian is offline  
Old 10-03-2006, 08:06 AM   #3
Blade.dk
.
 
Blade.dk's Avatar


Respected User
 
Join Date: May 2005
Posts: 1,990

Submissions (15)

Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)

Approved Map: Azeroth's Arcane ArenaSpell session 01 winner

Send a message via MSN to Blade.dk
Default

Awesome - One thing though: I think the highlight color is very light, I find it hard to see on this screen. Else good job. (You can delete this when you've read it).
__________________
Spell Making Course: Part 1: Making a simple stomp spell.
I wonder if I'll ever finish part 2.
Blade.dk is offline  
Old 10-04-2007, 04:32 AM   #4
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Take a look to the new things I added to the jass tag.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline  
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 06:21 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services