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 > Resources > Code Resources > Systems
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 11-12-2008, 09:41 PM   #166
Joker
User
 
Joker's Avatar
 
Join Date: Sep 2006
Posts: 687

Joker will become famous soon enough (32)Joker will become famous soon enough (32)

Default

Can you use more than one exception for xedamage?

On xecollider, expirationTime is when it disappears right? What if you want the projectile to die after a collision?

Last edited by Joker : 11-12-2008 at 10:21 PM.
Joker is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 11-12-2008, 10:09 PM   #167
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

Quote:
On xecollider, expirationTime is when it disappears right? What if you want the projectile to die after a collision?
you can just call terminate() in onUnitHit

Quote:
Can you use more than one exception for xedamage?
nope, but you can add a factor of 0.0 which will basically do the same,
__________________
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   Reply With Quote
Old 11-12-2008, 10:21 PM   #168
Joker
User
 
Joker's Avatar
 
Join Date: Sep 2006
Posts: 687

Joker will become famous soon enough (32)Joker will become famous soon enough (32)

Default

My first attempt with xe which does not work. I don't even see the projectile.
Collapse a simple death coil:
scope DeathCoil initializer Init

globals
    private constant integer ABILITY_ID = 'A001'
    private constant string  PROJECTILE = "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdl"
    private constant string  COLLISION  = "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl"
    
    private xedamage DAMAGE
endglobals

    private struct Coil extends xecollider
        unit owner
        integer lvl
        
        method onUnitHit takes unit target returns nothing
            if DAMAGE.allowedTarget( this.owner, target ) then
                call DAMAGE.damageTarget( this.owner, target, (this.lvl*5.) + 20. )
                call this.terminate()
            endif
        endmethod
    endstruct
    
    private function Damage takes xedamage d returns nothing
        set d.dtype     = DAMAGE_TYPE_MAGIC 
        set d.atype     = ATTACK_TYPE_NORMAL
        set d.exception = UNIT_TYPE_FLYING

        set d.damageAllies  = true
        set d.allyfactor    = -1.
        
        call d.useSpecialEffect(COLLISION, "chest") 
    endfunction

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == ABILITY_ID
endfunction

private function Actions takes nothing returns nothing
    local unit a = GetTriggerUnit()
    local location l = GetSpellTargetLoc()
    local real x = GetUnitX(a)
    local real y = GetUnitY(a)
    local real xx = GetLocationX(l)
    local real yy = GetLocationY(l)
    local real angle = Atan2( yy-y, xx-x )
    local Coil dat = Coil.create( x+32.*Cos(angle), x+32.*Sin(angle), angle*RADTODEG )
    
    set dat.owner = a
    set dat.lvl = GetUnitAbilityLevel( a, ABILITY_ID )
    
    set dat.fxpath = PROJECTILE
    set dat.acceleration   = 1000.
    set dat.maxSpeed       = 1000.
    set dat.expirationTime = 2.

    set dat.z              = 100.0
    
    call dat.recolor(255, 200, 75, 255)
    
    call RemoveLocation(l)
    set a = null
    set l = null
endfunction

private function Init takes nothing returns nothing
    local trigger t = CreateTrigger()
    local integer i = 0
    
    set DAMAGE = xedamage.create()
    call Damage(DAMAGE)
    
    call TriggerAddCondition( t, Condition( function Conditions ) )
    call TriggerAddAction( t, function Actions )
    loop
        call TriggerRegisterPlayerUnitEvent( t, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, BOOLEXPR_TRUE )
        set i = i + 1
        exitwhen i >= 10
    endloop
endfunction

endscope
Joker is offline   Reply With Quote
Old 11-12-2008, 10:38 PM   #169
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

It should at least appear. Possible stuff:

* ABiLITY_ID is wrong?
* XE_DUMMY_UNIT_ID not set correctly.
* Model not imported correctly / Evil WE unimported it
__________________
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   Reply With Quote
Old 11-12-2008, 10:54 PM   #170
Joker
User
 
Joker's Avatar
 
Join Date: Sep 2006
Posts: 687

Joker will become famous soon enough (32)Joker will become famous soon enough (32)

Default

Sigh...I put the x value in place of the y value for the y coordinate of the projectile...

Edit: Everything's fine now.

Last edited by Joker : 11-13-2008 at 12:01 AM.
Joker is offline   Reply With Quote
Old 11-13-2008, 01:28 AM   #171
greasontim
User
 
Join Date: Nov 2008
Posts: 4

greasontim has little to show at this moment (0)

Default

i cant even get Jass to work unless its made by a outside source if anyone has any ideas y can u tell me plz
when i load a game with Jass in it it doesnt load the map kist WC3
greasontim is offline   Reply With Quote
Old 11-13-2008, 01:45 AM   #172
Joker
User
 
Joker's Avatar
 
Join Date: Sep 2006
Posts: 687

Joker will become famous soon enough (32)Joker will become famous soon enough (32)

Default

How does you being unable to code JASS any relevant to XE?

On topic: How do you scale your sfx? I see a scale method in the library, but its an operator. I don't see any method in the doc for xefx either.

Last edited by Joker : 11-13-2008 at 01:46 AM.
Joker is offline   Reply With Quote
Old 11-13-2008, 01:56 AM   #173
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

set x.scale = 2.0 A xecollider is also a xefx so all the stuff you can find in the xefx documentation is relevant for xecolider as well.
__________________
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   Reply With Quote
Old 11-13-2008, 02:31 AM   #174
greasontim
User
 
Join Date: Nov 2008
Posts: 4

greasontim has little to show at this moment (0)

Default

what it has to do with XE is someone has it with XE and when i add XE into the map the map dont load so im just wondering whats going on with it

i'll show the things but i need someone to look at them and show me what im messing up on
greasontim is offline   Reply With Quote
Old 11-13-2008, 08:49 AM   #175
Av3n
Roar!
 
Av3n's Avatar


Project Leader: TBR
Project Member: PoC
 
Join Date: May 2006
Posts: 1,854

Submissions (7)

Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)Av3n is a jewel in the rough (240)

Hero #4 extra-official winner2008 Spell olympics - Fire - BronzeHero Contest #3 - 3rd Place

Default

You need to use a vJass preprocessor, I guess you added it to the map saved it in normal WE then try to load the map via Wc3 cause WE doesn't seem to save it properly. Link to the basic toolkit to operate vJass

-Av3n
__________________

Thanks to FatherTime for the sig
.:
Current ProjectsSubmissions
Power of CorruptionMy Terrain
The Black RoadMy Resources
Strikeforce
Twitter
Av3n is offline   Reply With Quote
Old 11-16-2008, 07:53 PM   #176
Joker
User
 
Joker's Avatar
 
Join Date: Sep 2006
Posts: 687

Joker will become famous soon enough (32)Joker will become famous soon enough (32)

Default

I'm just using xedamage on this one. I see the text a, but b doesnt show..
Collapse JASS:
scope Unburrow initializer Init

globals
    private constant integer ABILITY_ID = 'A005'
    private constant integer BURROW_ID  = 'u007'
    private constant string  EFFECT     = "Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl"
    private constant string  COLLISION  = "Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl"
    private constant real    AOE        = 200.0
    private constant real    DAMAGE     = 100.
endglobals

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == ABILITY_ID //and GetUnitTypeId(GetTriggerUnit()) == BURROW_ID
endfunction

private function Boolexpr takes nothing returns boolean
    return GetWidgetLife(GetFilterUnit()) > 0.405
endfunction

private function Actions takes nothing returns nothing
    local unit a = GetTriggerUnit()
    local real x = GetUnitX(a)
    local real y = GetUnitY(a)
    local group g = NewGroup()
    local xedamage d = xedamage.create()
    call DestroyEffect(AddSpecialEffect(EFFECT, x, y))
    call BJDebugMsg("a")
    set d.dtype     = DAMAGE_TYPE_MAGIC 
    set d.atype     = ATTACK_TYPE_NORMAL
    set d.exception = UNIT_TYPE_STRUCTURE
        
    call d.factor( UNIT_TYPE_FLYING, 0 )
    call d.useSpecialEffect( COLLISION, "origin" ) 
    
    call GroupEnumUnitsInRange(g, x, y, AOE, BOOLEXPR_TRUE)
    call d.damageGroup(a, g, DAMAGE)
    call BJDebugMsg("b")
    call RemoveUnit(a)
    call ReleaseGroup(g)
    set a = null
endfunction

private function Init takes nothing returns nothing
    local trigger t = CreateTrigger()
    local integer i = 0
    
    call TriggerAddCondition( t, Condition( function Conditions ) )
    call TriggerAddAction( t, function Actions )
    loop
        call TriggerRegisterPlayerUnitEvent( t, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, BOOLEXPR_TRUE )
        set i = i + 1
        exitwhen i >= 10
    endloop
endfunction

endscope
Joker is offline   Reply With Quote
Old 11-29-2008, 07:27 AM   #177
Malf
I LIKE PIZZA! | >
 
Malf's Avatar
 
Join Date: Sep 2007
Posts: 625

Submissions (2)

Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)

Send a message via AIM to Malf
Default

Can we expect to see a nova system? Like, xenova? Manually creating 18 xecollider objects is hard, and I have to store data on a unit to see if it was already hit by an xecollider or not, because a unit only needs to be hit once.
__________________
Malf is offline   Reply With Quote
Old 12-15-2008, 12:24 AM   #178
Defi4nc3
User
 
Defi4nc3's Avatar
 
Join Date: Feb 2006
Posts: 6

Defi4nc3 has little to show at this moment (0)

Send a message via AIM to Defi4nc3
Default

I find this system to be rather nice, its also great you can have both caster and xe in one map, i've been using your caster system since release, but XE looks to be promising with enough work, its pretty fun with what you can already create.

Awesome job!
__________________
Defi4nc3 is offline   Reply With Quote
Old 12-15-2008, 07:51 PM   #179
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

xepreload crashes wc3 at map init if you try to preload an engineering upgrade-based ability, for obvious reasons. Not sure if this particular exception is worth modifying xepreload, though (basically, you'd need to use a hero instead of the xe dummy unit).
__________________
Anitarf is offline   Reply With Quote
Old 01-02-2009, 08:55 AM   #180
Themerion
Brahms-fan
 
Themerion's Avatar
 
Join Date: Jan 2006
Posts: 642

Submissions (2)

Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)

Default

Does xecollider use one timer per instance? (if y, why?)

I'd have checked the code, but since I'm currently not on a computer with WE, and no scripts but xebasic have been posted.. well... =)
__________________
Submissions::
(v)JASS Tutorial
Covers how to make fast and safe coding for common tasks in vJASS/JASS.
Creep Respawn System
It has never been easier to respawn creep groups...

Last edited by Themerion : 01-02-2009 at 08:56 AM.
Themerion is offline   Reply With Quote
Reply


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 10:24 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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